1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

* Set the NIX_STORE and NIX_BUILD_TOP environment variables in

builders to point to the store and the temporary build directory,
  respectively.  Useful for purity checking.
* Also set TEMPDIR, TMPDIR, TEMP, and TEMP to NIX_BUILD_TOP to make
  sure that tools in the builder store temporary files in the right
  location.
This commit is contained in:
Eelco Dolstra 2004-03-12 10:45:08 +00:00
parent 7f0ed370da
commit a5619f1dff
3 changed files with 19 additions and 3 deletions

View file

@ -124,6 +124,12 @@ Path normaliseStoreExpr(const Path & _nePath, PathSet pending)
non-existing path. */
env["HOME"] = "/homeless-shelter";
/* Tell the builder where the Nix store is. Usually they
shouldn't care, but this is useful for purity checking (e.g.,
the compiler or linker might only want to accept paths to files
in the store or in the build directory). */
env["NIX_STORE"] = nixStore;
/* Build the environment. */
for (StringPairs::iterator i = ne.derivation.env.begin();
i != ne.derivation.env.end(); i++)