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.in29
1 files changed, 10 insertions, 19 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index 60ccce4edacf..52f4a30123d7 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -138,7 +138,6 @@ print STDERR "creating manifest...\n";
 
 my %narFiles;
 my %patches;
-my %successors;
 
 my @nararchives;
 for (my $n = 0; $n < scalar @storePaths; $n++) {
@@ -169,7 +168,14 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
     
     my $narbz2Size = (stat $narfile)[7];
 
-    my $references = join(" ", split(" ", `$binDir/nix-store --query --references '$storePath'`));
+    my $references = `$binDir/nix-store --query --references '$storePath'`;
+    die "cannot query references for `$storePath'" if $? != 0;
+    $references = join(" ", split(" ", $references));
+
+    my $deriver = `$binDir/nix-store --query --deriver '$storePath'`;
+    die "cannot query deriver for `$storePath'" if $? != 0;
+    chomp $deriver;
+    $deriver = "" if $deriver eq "unknown-deriver";
 
     my $url;
     if ($localCopy) {
@@ -184,27 +190,12 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
         , narHash => $narHash
         , hashAlgo => "sha1"
         , references => $references
+        , deriver => $deriver
         }
     ];
-                            
-    if ($storePath =~ /\.store$/) {
-        open PREDS, "$binDir/nix-store --query --predecessors $storePath |" or die "cannot run nix";
-        while (<PREDS>) {
-            chomp;
-            die unless (/^\//);
-            my $pred = $_;
-            # Only include predecessors that are themselves being
-            # pushed.
-            if (defined $storePaths{$pred}) {
-                $successors{$pred} = $storePath;
-            }
-        }
-        close PREDS;
-    }
-
 }
 
-writeManifest $manifest, \%narFiles, \%patches, \%successors;
+writeManifest $manifest, \%narFiles, \%patches;
 
 
 sub copyFile {