From 3259ae58119b93ca48a267ec90d7e1efb929fef8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 Feb 2005 17:36:42 +0000 Subject: * 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). --- scripts/nix-prefetch-url.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/nix-prefetch-url.in') 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 -- cgit 1.4.1