about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-11-29T12·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-11-29T12·32+0000
commit216440b3ff1431beca7784c7ae76cb5e75446953 (patch)
tree471af726ccbb29740673a39b10cc797a22b8f4b9 /scripts
parent1df120cb05121124379676d805b8f1fb090d7e22 (diff)
* For consistency with "nix-store -q --hash", produce hashes in
  base-32.  (This affects Hydra manifests.)

Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-push.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index dcdad5721265..cf46d00dfb06 100755
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -198,8 +198,8 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
     # In some exceptional cases (such as VM tests that use the Nix
     # store of the host), the database doesn't contain the hash.  So
     # compute it.
-    if ($narHash eq "sha256:0000000000000000000000000000000000000000000000000000") {
-        $narHash = `$binDir/nix-hash --type sha256 '$storePath'`;
+    if ($narHash =~ /^sha256:0*$/) {
+        $narHash = `$binDir/nix-hash --type sha256 --base32 '$storePath'`;
         die "cannot hash `$storePath'" if $? != 0;
         chomp $narHash;
         $narHash = "sha256:$narHash";