diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-07-21 06:01:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 06:01:05 +0000 |
commit | 17a15a50abead91057d245f3c1dc5feb684228fa (patch) | |
tree | 546c589f703bc5359921fe4d8ab16c309005b7d7 /pkgs/build-support | |
parent | 61505962dcfd0db96e9154ad18f4a7e474b30b44 (diff) | |
parent | 104a964b5c9fc941c0a3287b3c576bcd44196839 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchdarcs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/fetchgit/default.nix | 6 | ||||
-rw-r--r-- | pkgs/build-support/fetchhg/default.nix | 5 | ||||
-rw-r--r-- | pkgs/build-support/fetchsvn/default.nix | 6 | ||||
-rw-r--r-- | pkgs/build-support/fetchsvnssh/default.nix | 5 | ||||
-rw-r--r-- | pkgs/build-support/fetchurl/default.nix | 2 |
6 files changed, 6 insertions, 22 deletions
diff --git a/pkgs/build-support/fetchdarcs/default.nix b/pkgs/build-support/fetchdarcs/default.nix index 9ab57d5c05ea5..6073efec28159 100644 --- a/pkgs/build-support/fetchdarcs/default.nix +++ b/pkgs/build-support/fetchdarcs/default.nix @@ -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]; diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 3d73eae9821ea..1d06ce44a91ea 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -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 diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix index a5817f2c3050f..6af886bf09344 100644 --- a/pkgs/build-support/fetchhg/default.nix +++ b/pkgs/build-support/fetchhg/default.nix @@ -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. diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix index 1a5764b4f6190..41752eb55a7a8 100644 --- a/pkgs/build-support/fetchsvn/default.nix +++ b/pkgs/build-support/fetchsvn/default.nix @@ -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 { diff --git a/pkgs/build-support/fetchsvnssh/default.nix b/pkgs/build-support/fetchsvnssh/default.nix index fbd74efd750ad..ef72de61fe218 100644 --- a/pkgs/build-support/fetchsvnssh/default.nix +++ b/pkgs/build-support/fetchsvnssh/default.nix @@ -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; diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 28d2519f4232c..bcab54e273dcf 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -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; } |