about summary refs log tree commit diff
path: root/corepkgs/nar
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-03-15T11·12+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-03-15T11·12+0000
commite52ae1c0ffed6af893438cb456c5c38a272c8b21 (patch)
tree377ed4355afd78620c77337b94a606511c4e1475 /corepkgs/nar
parent155c91b335c4041db5c9e83b8314757bdf7137b8 (diff)
* Use SHA-256 for nix-push.
Diffstat (limited to 'corepkgs/nar')
-rw-r--r--corepkgs/nar/nar.nix5
-rw-r--r--corepkgs/nar/nar.sh.in4
2 files changed, 4 insertions, 5 deletions
diff --git a/corepkgs/nar/nar.nix b/corepkgs/nar/nar.nix
index f288e0ed49e6..e0d4878bf4f3 100644
--- a/corepkgs/nar/nar.nix
+++ b/corepkgs/nar/nar.nix
@@ -1,6 +1,5 @@
-{system, path}: derivation {
+{system, path, hashAlgo}: derivation {
   name = "nar";
   builder = ./nar.sh;
-  system = system;
-  path = path;
+  inherit system path hashAlgo;
 }
diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in
index d64cfd815dbe..1a7c33ab26dd 100644
--- a/corepkgs/nar/nar.sh.in
+++ b/corepkgs/nar/nar.sh.in
@@ -10,8 +10,8 @@ dst=$out/tmp.nar.bz2
 
 @bzip2@ < tmp > $dst
 
-@bindir@/nix-hash -vvvvv --flat --type sha1 --base32 tmp > $out/nar-hash
+@bindir@/nix-hash -vvvvv --flat --type $hashAlgo --base32 tmp > $out/nar-hash
 
-@bindir@/nix-hash --flat --type sha1 --base32 $dst > $out/narbz2-hash
+@bindir@/nix-hash --flat --type $hashAlgo --base32 $dst > $out/narbz2-hash
 
 mv $out/tmp.nar.bz2 $out/$(cat $out/narbz2-hash).nar.bz2