diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-03-12T10·45+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-03-12T10·45+0000 |
commit | a5619f1dffbf3600dd16b51e84ae3c999edc439c (patch) | |
tree | 4fbebc9352ecb394f396dfad023c56ab694e9fa5 /src/libstore/normalise.cc | |
parent | 7f0ed370da62b867d90ba5346f4b9f217fbbe10f (diff) |
* 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.
Diffstat (limited to 'src/libstore/normalise.cc')
-rw-r--r-- | src/libstore/normalise.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/normalise.cc b/src/libstore/normalise.cc index 5c13f04ecbfd..e287914a100c 100644 --- a/src/libstore/normalise.cc +++ b/src/libstore/normalise.cc @@ -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++) |