mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 14:04:52 +00:00
Merge pull request #243770 from tjni/remove-md5
fetchers: remove md5 argument
This commit is contained in:
commit
104a964b5c
@ -4,14 +4,10 @@ lib.makeOverridable (
|
||||
{ url
|
||||
, rev ? null
|
||||
, context ? null
|
||||
, md5 ? ""
|
||||
, sha256 ? ""
|
||||
, name ? "fetchdarcs"
|
||||
}:
|
||||
|
||||
if md5 != "" then
|
||||
throw "fetchdarcs does not support md5 anymore, please use sha256"
|
||||
else
|
||||
stdenvNoCC.mkDerivation {
|
||||
builder = ./builder.sh;
|
||||
nativeBuildInputs = [cacert darcs];
|
||||
|
@ -11,7 +11,7 @@
|
||||
in "${if matched == null then base else builtins.head matched}${appendShort}";
|
||||
in
|
||||
lib.makeOverridable (
|
||||
{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? "", leaveDotGit ? deepClone
|
||||
{ url, rev ? "HEAD", sha256 ? "", hash ? "", leaveDotGit ? deepClone
|
||||
, fetchSubmodules ? true, deepClone ? false
|
||||
, branchName ? null
|
||||
, sparseCheckout ? []
|
||||
@ -56,9 +56,7 @@ lib.makeOverridable (
|
||||
assert deepClone -> leaveDotGit;
|
||||
assert nonConeMode -> (sparseCheckout != []);
|
||||
|
||||
if md5 != "" then
|
||||
throw "fetchgit does not support md5 anymore, please use sha256"
|
||||
else if hash != "" && sha256 != "" then
|
||||
if hash != "" && sha256 != "" then
|
||||
throw "Only one of sha256 or hash can be set"
|
||||
else if builtins.isString sparseCheckout then
|
||||
# Changed to throw on 2023-06-04
|
||||
|
@ -2,15 +2,12 @@
|
||||
{ name ? null
|
||||
, url
|
||||
, rev ? null
|
||||
, md5 ? null
|
||||
, sha256 ? null
|
||||
, hash ? null
|
||||
, fetchSubrepos ? false
|
||||
, preferLocalBuild ? true }:
|
||||
|
||||
if md5 != null then
|
||||
throw "fetchhg does not support md5 anymore, please use sha256 or hash"
|
||||
else if hash != null && sha256 != null then
|
||||
if hash != null && sha256 != null then
|
||||
throw "Only one of sha256 or hash can be set"
|
||||
else
|
||||
# TODO: statically check if mercurial as the https support if the url starts woth https.
|
||||
|
@ -2,7 +2,7 @@
|
||||
, subversion, glibcLocales, sshSupport ? true, openssh ? null
|
||||
}:
|
||||
|
||||
{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? ""
|
||||
{ url, rev ? "HEAD", sha256 ? "", hash ? ""
|
||||
, ignoreExternals ? false, ignoreKeywords ? false, name ? null
|
||||
, preferLocalBuild ? true
|
||||
}:
|
||||
@ -32,9 +32,7 @@ let
|
||||
name_ = if name == null then "${repoName}-r${toString rev}" else name;
|
||||
in
|
||||
|
||||
if md5 != "" then
|
||||
throw "fetchsvn does not support md5 anymore, please use sha256"
|
||||
else if hash != "" && sha256 != "" then
|
||||
if hash != "" && sha256 != "" then
|
||||
throw "Only one of sha256 or hash can be set"
|
||||
else
|
||||
stdenvNoCC.mkDerivation {
|
||||
|
@ -1,10 +1,7 @@
|
||||
{stdenvNoCC, subversion, sshSupport ? true, openssh ? null, expect}:
|
||||
{username, password, url, rev ? "HEAD", md5 ? "", sha256 ? ""}:
|
||||
{username, password, url, rev ? "HEAD", sha256 ? ""}:
|
||||
|
||||
|
||||
if md5 != "" then
|
||||
throw "fetchsvnssh does not support md5 anymore, please use sha256"
|
||||
else
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "svn-export-ssh";
|
||||
builder = ./builder.sh;
|
||||
|
@ -67,7 +67,6 @@ in
|
||||
, # Legacy ways of specifying the hash.
|
||||
outputHash ? ""
|
||||
, outputHashAlgo ? ""
|
||||
, md5 ? ""
|
||||
, sha1 ? ""
|
||||
, sha256 ? ""
|
||||
, sha512 ? ""
|
||||
@ -125,7 +124,6 @@ let
|
||||
if hash != "" && sha256 != "" then throw "multiple hashes passed to fetchurl" else
|
||||
|
||||
if hash != "" then { outputHashAlgo = null; outputHash = hash; }
|
||||
else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512"
|
||||
else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }
|
||||
else if sha512 != "" then { outputHashAlgo = "sha512"; outputHash = sha512; }
|
||||
else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
|
||||
|
Loading…
Reference in New Issue
Block a user