about summary refs log tree commit diff
path: root/scripts/nix-push.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-push.in')
-rw-r--r--scripts/nix-push.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index fdb4323038fc..bb25019e8d35 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -8,6 +8,8 @@ foreach my $id (@ARGV) {
 
     # Get all paths referenced by the normalisation of the given 
     # fstate expression.
+    system "nix -ih $id";
+    if ($?) { die "`nix -ih' failed"; }
     my @paths;
     open PATHS, "nix -qrh $id 2> /dev/null |" or die "nix -qrh";
     while (<PATHS>) {
@@ -51,6 +53,8 @@ foreach my $id (@ARGV) {
         die unless $nid =~ /^([0-9a-z]{32})$/;
 
         # Realise the Nix expression.
+	system "nix -ih $nid";
+	if ($?) { die "`nix -ih' failed"; }
         my $npath = `nix -qph $nid 2> /dev/null`;
         $? and die "creating Nix archive";
         chomp $npath;