mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
* Compatibility hack so that Nixpkgs can continue to do hash checking
in `fetchurl' in Nix <= 0.7, but doesn't in Nix 0.8.
This commit is contained in:
parent
3c1630131e
commit
eda2c3c253
2 changed files with 10 additions and 1 deletions
|
@ -989,6 +989,15 @@ void DerivationGoal::startBuilder()
|
|||
/* Also set TMPDIR and variants to point to this directory. */
|
||||
env["TMPDIR"] = env["TEMPDIR"] = env["TMP"] = env["TEMP"] = tmpDir;
|
||||
|
||||
/* Compatibility hack with Nix <= 0.7: if this is a fixed-output
|
||||
derivation, tell the builder, so that for instance `fetchurl'
|
||||
can skip checking the output. On older Nixes, this environment
|
||||
variable won't be set, so `fetchurl' will do the check. */
|
||||
for (DerivationOutputs::iterator i = drv.outputs.begin();
|
||||
i != drv.outputs.end(); ++i)
|
||||
if (i->second.hash != "")
|
||||
env["NIX_OUTPUT_CHECKED"] = "1";
|
||||
|
||||
/* Run the builder. */
|
||||
printMsg(lvlChatty, format("executing builder `%1%'") %
|
||||
drv.builder);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue