diff options
author | Robin Gloster <mail@glob.in> | 2017-03-13 13:31:44 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-03-20 22:23:41 +0100 |
commit | f57185db953670d6e4f334b7ad2dc79a96d703c4 (patch) | |
tree | b306c2b35218daa92894a1256dd5dd32c2ff3698 /pkgs/build-support/fetchhg | |
parent | 1c3308e9c1dcbfc939b8cfd6d4f6e7b1c4b40748 (diff) |
fetch-*: remove md5 support
fixes #4491
Diffstat (limited to 'pkgs/build-support/fetchhg')
-rw-r--r-- | pkgs/build-support/fetchhg/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix index 79f610166a797..aba12317963ac 100644 --- a/pkgs/build-support/fetchhg/default.nix +++ b/pkgs/build-support/fetchhg/default.nix @@ -1,5 +1,8 @@ {stdenv, mercurial, nix}: {name ? null, url, rev ? null, md5 ? null, sha256 ? null, fetchSubrepos ? false}: +if md5 != null then + throw "fetchhg does not support md5 anymore, please use sha256" +else # TODO: statically check if mercurial as the https support if the url starts woth https. stdenv.mkDerivation { name = "hg-archive" + (if name != null then "-${name}" else ""); @@ -8,14 +11,11 @@ stdenv.mkDerivation { impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; - # Nix <= 0.7 compatibility. - id = md5; - subrepoClause = if fetchSubrepos then "S" else ""; - outputHashAlgo = if md5 != null then "md5" else "sha256"; + outputHashAlgo = "sha256"; outputHashMode = "recursive"; - outputHash = if md5 != null then md5 else sha256; + outputHash = sha256; inherit url rev; preferLocalBuild = true; |