about summary refs log tree commit diff
path: root/scripts/nix-prefetch-url.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-02-24T17·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-02-24T17·36+0000
commit3259ae58119b93ca48a267ec90d7e1efb929fef8 (patch)
tree742731d8af77c491ddfb2c7100a3be1f4a4511a2 /scripts/nix-prefetch-url.in
parent95e870a113e98bf23222535d842e525021a15f10 (diff)
* Properly specify the hash algorithm in the manifests, and read it
  too.
* Change the default hash for nix-prefetch-url back to md5, since
  that's what we use in Nixpkgs (for now; a birthday attack is rather
  unlikely there).  

Diffstat (limited to 'scripts/nix-prefetch-url.in')
-rw-r--r--scripts/nix-prefetch-url.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index b33aa8a850bd..ed3ad87e49f3 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -3,7 +3,10 @@
 url=$1
 hash=$2
 
-hashType="sha1"
+hashType=$NIX_HASH_ALGO
+if test -z "$hashType"; then
+    hashType=md5
+fi    
 
 if test -z "$url"; then
     echo "syntax: nix-prefetch-url URL" >&2