diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-07-20 18:01:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 18:01:17 +0000 |
commit | da1f279ece6a5ac3fa01c9cc14c57207778f476c (patch) | |
tree | 766885371857a19599e476dd6bd2a346cc1a0700 /pkgs/build-support | |
parent | 37df58121d2800d76f8b679048b94def964673bd (diff) | |
parent | 14cc255189a3862bde6dba8e72685c6c17e91934 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchsvn/default.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix index 82dececc124a3..1a5764b4f6190 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 ? "" +{ url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? "" , ignoreExternals ? false, ignoreKeywords ? false, name ? null , preferLocalBuild ? true }: @@ -34,6 +34,8 @@ in if md5 != "" then throw "fetchsvn does not support md5 anymore, please use sha256" +else if hash != "" && sha256 != "" then + throw "Only one of sha256 or hash can be set" else stdenvNoCC.mkDerivation { name = name_; @@ -43,9 +45,14 @@ stdenvNoCC.mkDerivation { SVN_SSH = if sshSupport then "${buildPackages.openssh}/bin/ssh" else null; - outputHashAlgo = "sha256"; + outputHashAlgo = if hash != "" then null else "sha256"; outputHashMode = "recursive"; - outputHash = sha256; + outputHash = if hash != "" then + hash + else if sha256 != "" then + sha256 + else + lib.fakeSha256; inherit url rev ignoreExternals ignoreKeywords; |