summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/fetchgit/default.nix')
-rw-r--r--pkgs/build-support/fetchgit/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix
index e40b460d390..d85d2c893c5 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;