fetch*: print a trace warning about md5 deprecation

This commit is contained in:
Michael Raskin
2016-10-09 16:19:04 +02:00
committed by Robin Gloster
parent c6b050fd2f
commit f603dc11a6
9 changed files with 23 additions and 9 deletions
+2 -1
View File
@@ -112,7 +112,8 @@ if (!hasHash) then throw "Specify hash for fetchurl fixed-output derivation: ${s
outputHashAlgo = if outputHashAlgo != "" then outputHashAlgo else
if sha512 != "" then "sha512" else if sha256 != "" then "sha256" else if sha1 != "" then "sha1" else "md5";
outputHash = if outputHash != "" then outputHash else
if sha512 != "" then sha512 else if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5;
if sha512 != "" then sha512 else if sha256 != "" then sha256 else if sha1 != "" then sha1 else
(stdenv.lib.fetchMD5warn "fetchurl" (builtins.head urls_) md5);
outputHashMode = if (recursiveHash || executable) then "recursive" else "flat";