about summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2023-11-13 21:23:56 +0100
committerfricklerhandwerk <valentin@fricklerhandwerk.de>2024-01-08 12:16:19 +0100
commit25c0077a31203850dff6d8ad554bcf9c76ec1018 (patch)
treeb6b778116be8240dd70ddc434e9c79ca8b902e0b /pkgs/build-support/trivial-builders
parent7ae1fdc9a7407947885e2cd006dc766e12e4d71a (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/build-support/trivial-builders')
-rw-r--r--pkgs/build-support/trivial-builders/default.nix1
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`.