diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-10-29T18·17+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-10-29T18·17+0000 |
commit | 221c79013f105612222cd7df3415bf63abcc7412 (patch) | |
tree | 447f039f28531f93810cfa1e4d94e75a5a4dd03a /scripts/nix-push.in | |
parent | f0856fd905ea727e88f3fc14d3c717679ce8359b (diff) |
* Turn off build hooks in nix-push because of an impurity (NIX-21).
Diffstat (limited to 'scripts/nix-push.in')
-rw-r--r-- | scripts/nix-push.in | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in index 800424c89608..85b74b84cc95 100644 --- a/scripts/nix-push.in +++ b/scripts/nix-push.in @@ -86,6 +86,12 @@ foreach my $storePath (@storePaths) { die unless ($storePath =~ /\/[0-9a-z]{32}.*$/); # Construct a Nix expression that creates a Nix archive. + # !!! the string reference to `$storePath' is impure! We could + # also pass it as a normal input, but that would cause it to be + # copied, and its name would be expanded (e.g., + # /nix/store/HASH1-HASH2-symname). nix-instantiate should be + # smart enough to add store paths as direct references of the Nix + # expression. my $nixexpr = "((import $dataDir/nix/corepkgs/nar/nar.nix) " . "{path = \"$storePath\"; system = \"@system@\"; hashAlgo = \"$hashAlgo\";}) "; @@ -122,7 +128,11 @@ while (scalar @tmp > 0) { my @tmp2 = @tmp[0..$n - 1]; @tmp = @tmp[$n..scalar @tmp - 1]; - my $pid = open(READ, "$binDir/nix-store --realise @tmp2|") + # Note: we disable build hooks because of the impure path + # reference (see above). Even if that is fixed, using a hook + # probably wouldn't make that much sense; pumping lots of data + # around just to compress them won't gain that much. + my $pid = open(READ, "NIX_BUILD_HOOK= $binDir/nix-store --realise @tmp2|") or die "cannot run nix-store"; while (<READ>) { chomp; |