Commit 25c0077a authored by Valentin Gagarin's avatar Valentin Gagarin Committed by fricklerhandwerk
Browse files

doc: add note on which variables are effective

The build log of the following won't output `foo` as one might expect, but the
`$PATH` set by stdenv.

```nix
with import <nixpkgs> {};
runCommand "foo" { PATH = "foo"; } "echo $PATH; touch $out"
```
parent 7ae1fdc9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ rec {
    Run the shell command `buildCommand' to produce a store path named `name'.

    The attributes in `env' are added to the environment prior to running the command.
    Environment variables set by `stdenv.mkDerivation` take precedence.

    By default `runCommand` runs in a stdenv with no compiler environment.
    `runCommandCC` uses the default stdenv, `pkgs.stdenv`.