diff options
Diffstat (limited to 'scripts/nix-prefetch-url.in')
-rw-r--r-- | scripts/nix-prefetch-url.in | 5 |
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 |