diff options
author | Valentin Gagarin <valentin.gagarin@tweag.io> | 2023-11-13 21:23:56 +0100 |
---|---|---|
committer | fricklerhandwerk <valentin@fricklerhandwerk.de> | 2024-01-08 12:16:19 +0100 |
commit | 25c0077a31203850dff6d8ad554bcf9c76ec1018 (patch) | |
tree | b6b778116be8240dd70ddc434e9c79ca8b902e0b /pkgs | |
parent | 7ae1fdc9a7407947885e2cd006dc766e12e4d71a (diff) |
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" ```
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/trivial-builders/default.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 3fd71e8f44322..bdb79d9bf463c 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -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`. |