summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2016-10-08 00:24:10 +0200
committerRobin Gloster <mail@glob.in>2016-10-09 16:19:04 +0200
commitf603dc11a63a9ae83e520955abe75d02b9591f83 (patch)
tree2ee4d26718d8633e3e0f86ff177afbd586f942b5 /pkgs/build-support
parentc6b050fd2fb53a9e11e765f62ec83d0911508d4e (diff)
downloadnixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.tar
nixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.tar.gz
nixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.tar.bz2
nixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.tar.lz
nixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.tar.xz
nixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.tar.zst
nixpkgs-f603dc11a63a9ae83e520955abe75d02b9591f83.zip
fetch*: print a trace warning about md5 deprecation
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchdarcs/default.nix3
-rw-r--r--pkgs/build-support/fetchegg/default.nix3
-rw-r--r--pkgs/build-support/fetchfile/default.nix8
-rw-r--r--pkgs/build-support/fetchgit/default.nix3
-rw-r--r--pkgs/build-support/fetchhg/default.nix3
-rw-r--r--pkgs/build-support/fetchsvn/default.nix3
-rw-r--r--pkgs/build-support/fetchsvnssh/default.nix3
-rw-r--r--pkgs/build-support/fetchurl/default.nix3
8 files changed, 20 insertions, 9 deletions
diff --git a/pkgs/build-support/fetchdarcs/default.nix b/pkgs/build-support/fetchdarcs/default.nix
index 3c2e0524eea..ecec51590b9 100644
--- a/pkgs/build-support/fetchdarcs/default.nix
+++ b/pkgs/build-support/fetchdarcs/default.nix
@@ -7,7 +7,8 @@ stdenv.mkDerivation {
 
   outputHashAlgo = if sha256 == "" then "md5" else "sha256";
   outputHashMode = "recursive";
-  outputHash = if sha256 == "" then md5 else sha256;
+  outputHash = if sha256 == "" then
+    (stdenv.lib.fetchMD5warn "fetchdarcs" url md5) else sha256;
   
   inherit url rev context;
 }
diff --git a/pkgs/build-support/fetchegg/default.nix b/pkgs/build-support/fetchegg/default.nix
index 3e0d5d566ad..e82d4d95ac2 100644
--- a/pkgs/build-support/fetchegg/default.nix
+++ b/pkgs/build-support/fetchegg/default.nix
@@ -11,7 +11,8 @@ stdenv.mkDerivation {
 
   outputHashAlgo = if sha256 == "" then "md5" else "sha256";
   outputHashMode = "recursive";
-  outputHash = if sha256 == "" then md5 else sha256;
+  outputHash = if sha256 == "" then
+    (stdenv.lib.fetchMD5warn "fetchegg" name md5) else sha256;
 
   inherit version;
 
diff --git a/pkgs/build-support/fetchfile/default.nix b/pkgs/build-support/fetchfile/default.nix
index bdddfab2b4d..685c1e69520 100644
--- a/pkgs/build-support/fetchfile/default.nix
+++ b/pkgs/build-support/fetchfile/default.nix
@@ -1,7 +1,11 @@
-{stdenv}: {pathname, md5}: stdenv.mkDerivation {
+{stdenv}: {pathname, md5 ? "", sha256 ? ""}: stdenv.mkDerivation {
   name = baseNameOf (toString pathname);
   builder = ./builder.sh;
   pathname = pathname;
-  md5 = md5;
+} // if (sha256 == "") then {
+  md5 = (stdenv.lib.fetchMD5warn "fetchfile" pathname md5);
   id = md5;
+} else {
+  sha256 = sha256;
+  id = sha256;
 }
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix
index 105b3d56bf4..59e06c95ebb 100644
--- a/pkgs/build-support/fetchgit/default.nix
+++ b/pkgs/build-support/fetchgit/default.nix
@@ -50,7 +50,8 @@ stdenv.mkDerivation {
 
   outputHashAlgo = if sha256 == "" then "md5" else "sha256";
   outputHashMode = "recursive";
-  outputHash = if sha256 == "" then md5 else sha256;
+  outputHash = if sha256 == "" then
+    (stdenv.lib.fetchMD5warn "fetchgit" url md5) else sha256;
 
   inherit url rev leaveDotGit fetchSubmodules deepClone branchName;
 
diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix
index 79f610166a7..b30a3556b0f 100644
--- a/pkgs/build-support/fetchhg/default.nix
+++ b/pkgs/build-support/fetchhg/default.nix
@@ -15,7 +15,8 @@ stdenv.mkDerivation {
 
   outputHashAlgo = if md5 != null then "md5" else "sha256";
   outputHashMode = "recursive";
-  outputHash = if md5 != null then md5 else sha256;
+  outputHash = if md5 != null then
+    (stdenv.lib.fetchMD5warn "fetchhg" url md5) else sha256;
 
   inherit url rev;
   preferLocalBuild = true;
diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix
index 85ec52c4bde..b6f68e21384 100644
--- a/pkgs/build-support/fetchsvn/default.nix
+++ b/pkgs/build-support/fetchsvn/default.nix
@@ -29,7 +29,8 @@ stdenv.mkDerivation {
 
   outputHashAlgo = if sha256 == "" then "md5" else "sha256";
   outputHashMode = "recursive";
-  outputHash = if sha256 == "" then md5 else sha256;
+  outputHash = if sha256 == "" then
+    (stdenv.lib.fetchMD5warn "fetchsvn" url md5) else sha256;
   
   inherit url rev sshSupport openssh ignoreExternals;
 
diff --git a/pkgs/build-support/fetchsvnssh/default.nix b/pkgs/build-support/fetchsvnssh/default.nix
index 6c6c03d6873..2d151fad07c 100644
--- a/pkgs/build-support/fetchsvnssh/default.nix
+++ b/pkgs/build-support/fetchsvnssh/default.nix
@@ -8,7 +8,8 @@ stdenv.mkDerivation {
 
   outputHashAlgo = if sha256 == "" then "md5" else "sha256";
   outputHashMode = "recursive";
-  outputHash = if sha256 == "" then md5 else sha256;
+  outputHash = if sha256 == "" then
+    (stdenv.lib.fetchMD5warn "fetchsvnssh" url md5) else sha256;
   
   sshSubversion = ./sshsubversion.exp;
   
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix
index 00f485ce697..2cc45ca4bbf 100644
--- a/pkgs/build-support/fetchurl/default.nix
+++ b/pkgs/build-support/fetchurl/default.nix
@@ -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";