diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-12-16T23·33+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-12-16T23·33+0000 |
commit | 194d21f9f63ceb034f3e8294f89aa6bf6a217bc9 (patch) | |
tree | 7eb6da5955482a82f4d34b60dcb10514a4a55f59 /scripts/nix-push.in | |
parent | 3c3107da86ff71a08ce44027ee5899acf486796a (diff) | |
parent | 273b288a7e862ac1918064537ff130cc751fa9fd (diff) |
* Sync with the trunk.
Diffstat (limited to 'scripts/nix-push.in')
-rwxr-xr-x | scripts/nix-push.in | 4 |
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"; |