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/fetchgit | |
parent | 1c3308e9c1dcbfc939b8cfd6d4f6e7b1c4b40748 (diff) |
fetch-*: remove md5 support
fixes #4491
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rw-r--r-- | pkgs/build-support/fetchgit/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index e40b460d390ae..d85d2c893c520 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -39,18 +39,20 @@ in server admins start using the new version? */ -assert md5 != "" || sha256 != ""; assert deepClone -> leaveDotGit; +if md5 != "" then + throw "fetchgit does not support md5 anymore, please use sha256" +else stdenv.mkDerivation { inherit name; builder = ./builder.sh; fetcher = "${./nix-prefetch-git}"; # This must be a string to ensure it's called with bash. buildInputs = [git]; - outputHashAlgo = if sha256 == "" then "md5" else "sha256"; + outputHashAlgo = "sha256"; outputHashMode = "recursive"; - outputHash = if sha256 == "" then md5 else sha256; + outputHash = sha256; inherit url rev leaveDotGit fetchSubmodules deepClone branchName; |