···11 in "${if matched == null then base else builtins.head matched}${appendShort}";
12in
13lib.makeOverridable (
14-{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? "", leaveDotGit ? deepClone
15, fetchSubmodules ? true, deepClone ? false
16, branchName ? null
17, sparseCheckout ? []
···56assert deepClone -> leaveDotGit;
57assert nonConeMode -> (sparseCheckout != []);
5859-if md5 != "" then
60- throw "fetchgit does not support md5 anymore, please use sha256"
61-else if hash != "" && sha256 != "" then
62 throw "Only one of sha256 or hash can be set"
63else if builtins.isString sparseCheckout then
64 # Changed to throw on 2023-06-04
···11 in "${if matched == null then base else builtins.head matched}${appendShort}";
12in
13lib.makeOverridable (
14+{ url, rev ? "HEAD", sha256 ? "", hash ? "", leaveDotGit ? deepClone
15, fetchSubmodules ? true, deepClone ? false
16, branchName ? null
17, sparseCheckout ? []
···56assert deepClone -> leaveDotGit;
57assert nonConeMode -> (sparseCheckout != []);
5859+if hash != "" && sha256 != "" then
0060 throw "Only one of sha256 or hash can be set"
61else if builtins.isString sparseCheckout then
62 # Changed to throw on 2023-06-04
+1-4
pkgs/build-support/fetchhg/default.nix
···2{ name ? null
3, url
4, rev ? null
5-, md5 ? null
6, sha256 ? null
7, hash ? null
8, fetchSubrepos ? false
9, preferLocalBuild ? true }:
1011-if md5 != null then
12- throw "fetchhg does not support md5 anymore, please use sha256 or hash"
13-else if hash != null && sha256 != null then
14 throw "Only one of sha256 or hash can be set"
15else
16# TODO: statically check if mercurial as the https support if the url starts woth https.
···2{ name ? null
3, url
4, rev ? null
05, sha256 ? null
6, hash ? null
7, fetchSubrepos ? false
8, preferLocalBuild ? true }:
910+if hash != null && sha256 != null then
0011 throw "Only one of sha256 or hash can be set"
12else
13# TODO: statically check if mercurial as the https support if the url starts woth https.
+2-4
pkgs/build-support/fetchsvn/default.nix
···2, subversion, glibcLocales, sshSupport ? true, openssh ? null
3}:
45-{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? ""
6, ignoreExternals ? false, ignoreKeywords ? false, name ? null
7, preferLocalBuild ? true
8}:
···32 name_ = if name == null then "${repoName}-r${toString rev}" else name;
33in
3435-if md5 != "" then
36- throw "fetchsvn does not support md5 anymore, please use sha256"
37-else if hash != "" && sha256 != "" then
38 throw "Only one of sha256 or hash can be set"
39else
40stdenvNoCC.mkDerivation {
···2, subversion, glibcLocales, sshSupport ? true, openssh ? null
3}:
45+{ url, rev ? "HEAD", sha256 ? "", hash ? ""
6, ignoreExternals ? false, ignoreKeywords ? false, name ? null
7, preferLocalBuild ? true
8}:
···32 name_ = if name == null then "${repoName}-r${toString rev}" else name;
33in
3435+if hash != "" && sha256 != "" then
0036 throw "Only one of sha256 or hash can be set"
37else
38stdenvNoCC.mkDerivation {
+1-4
pkgs/build-support/fetchsvnssh/default.nix
···1{stdenvNoCC, subversion, sshSupport ? true, openssh ? null, expect}:
2-{username, password, url, rev ? "HEAD", md5 ? "", sha256 ? ""}:
345-if md5 != "" then
6- throw "fetchsvnssh does not support md5 anymore, please use sha256"
7-else
8stdenvNoCC.mkDerivation {
9 name = "svn-export-ssh";
10 builder = ./builder.sh;