From 221c79013f105612222cd7df3415bf63abcc7412 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Oct 2005 18:17:45 +0000 Subject: * Turn off build hooks in nix-push because of an impurity (NIX-21). --- scripts/nix-push.in | 12 +++++++++++- src/libexpr/Makefile.am | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/nix-push.in b/scripts/nix-push.in index 800424c89..85b74b84c 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 () { chomp; diff --git a/src/libexpr/Makefile.am b/src/libexpr/Makefile.am index 5571179f8..dbc93abd5 100644 --- a/src/libexpr/Makefile.am +++ b/src/libexpr/Makefile.am @@ -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 -- cgit v1.2.3