mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
* Turn off build hooks in nix-push because of an impurity (NIX-21).
This commit is contained in:
parent
f0856fd905
commit
221c79013f
2 changed files with 12 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -15,7 +15,7 @@ AM_CFLAGS = \
|
|||
|
||||
# Parser generation.
|
||||
|
||||
parser.o: parser-tab.h lexer-tab.h
|
||||
parser.cc: parser-tab.h lexer-tab.h
|
||||
|
||||
parser-tab.c parser-tab.h: parser.y
|
||||
$(bison) -v -o parser-tab.c parser.y -d
|
||||
|
|
Loading…
Reference in a new issue