···44{ url
55, rev ? null
66, context ? null
77-, md5 ? ""
87, sha256 ? ""
98, name ? "fetchdarcs"
109}:
11101212-if md5 != "" then
1313- throw "fetchdarcs does not support md5 anymore, please use sha256"
1414-else
1511stdenvNoCC.mkDerivation {
1612 builder = ./builder.sh;
1713 nativeBuildInputs = [cacert darcs];
+2-4
pkgs/build-support/fetchgit/default.nix
···1111 in "${if matched == null then base else builtins.head matched}${appendShort}";
1212in
1313lib.makeOverridable (
1414-{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? "", leaveDotGit ? deepClone
1414+{ url, rev ? "HEAD", sha256 ? "", hash ? "", leaveDotGit ? deepClone
1515, fetchSubmodules ? true, deepClone ? false
1616, branchName ? null
1717, sparseCheckout ? []
···5656assert deepClone -> leaveDotGit;
5757assert nonConeMode -> (sparseCheckout != []);
58585959-if md5 != "" then
6060- throw "fetchgit does not support md5 anymore, please use sha256"
6161-else if hash != "" && sha256 != "" then
5959+if hash != "" && sha256 != "" then
6260 throw "Only one of sha256 or hash can be set"
6361else if builtins.isString sparseCheckout then
6462 # Changed to throw on 2023-06-04
+1-4
pkgs/build-support/fetchhg/default.nix
···22{ name ? null
33, url
44, rev ? null
55-, md5 ? null
65, sha256 ? null
76, hash ? null
87, fetchSubrepos ? false
98, preferLocalBuild ? true }:
1091111-if md5 != null then
1212- throw "fetchhg does not support md5 anymore, please use sha256 or hash"
1313-else if hash != null && sha256 != null then
1010+if hash != null && sha256 != null then
1411 throw "Only one of sha256 or hash can be set"
1512else
1613# TODO: statically check if mercurial as the https support if the url starts woth https.
+2-4
pkgs/build-support/fetchsvn/default.nix
···22, subversion, glibcLocales, sshSupport ? true, openssh ? null
33}:
4455-{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? ""
55+{ url, rev ? "HEAD", sha256 ? "", hash ? ""
66, ignoreExternals ? false, ignoreKeywords ? false, name ? null
77, preferLocalBuild ? true
88}:
···3232 name_ = if name == null then "${repoName}-r${toString rev}" else name;
3333in
34343535-if md5 != "" then
3636- throw "fetchsvn does not support md5 anymore, please use sha256"
3737-else if hash != "" && sha256 != "" then
3535+if hash != "" && sha256 != "" then
3836 throw "Only one of sha256 or hash can be set"
3937else
4038stdenvNoCC.mkDerivation {
+1-4
pkgs/build-support/fetchsvnssh/default.nix
···11{stdenvNoCC, subversion, sshSupport ? true, openssh ? null, expect}:
22-{username, password, url, rev ? "HEAD", md5 ? "", sha256 ? ""}:
22+{username, password, url, rev ? "HEAD", sha256 ? ""}:
334455-if md5 != "" then
66- throw "fetchsvnssh does not support md5 anymore, please use sha256"
77-else
85stdenvNoCC.mkDerivation {
96 name = "svn-export-ssh";
107 builder = ./builder.sh;
-2
pkgs/build-support/fetchurl/default.nix
···6767, # Legacy ways of specifying the hash.
6868 outputHash ? ""
6969, outputHashAlgo ? ""
7070-, md5 ? ""
7170, sha1 ? ""
7271, sha256 ? ""
7372, sha512 ? ""
···125124 if hash != "" && sha256 != "" then throw "multiple hashes passed to fetchurl" else
126125127126 if hash != "" then { outputHashAlgo = null; outputHash = hash; }
128128- else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512"
129127 else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }
130128 else if sha512 != "" then { outputHashAlgo = "sha512"; outputHash = sha512; }
131129 else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }