about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-02-02 12:01:43 +0000
committerGitHub <noreply@github.com>2024-02-02 12:01:43 +0000
commit0675b4b94752980cd5215888f281284d3910c212 (patch)
tree48de8a3cff869720ac40693754e25a4542428841 /pkgs/build-support
parent3a8e4cc2aacae6a02766368b22981e55aa04cf33 (diff)
parent0c08ae9c217d89fb32c328c99446226f533ff68d (diff)
downloadnixlib-0675b4b94752980cd5215888f281284d3910c212.tar
nixlib-0675b4b94752980cd5215888f281284d3910c212.tar.gz
nixlib-0675b4b94752980cd5215888f281284d3910c212.tar.bz2
nixlib-0675b4b94752980cd5215888f281284d3910c212.tar.lz
nixlib-0675b4b94752980cd5215888f281284d3910c212.tar.xz
nixlib-0675b4b94752980cd5215888f281284d3910c212.tar.zst
nixlib-0675b4b94752980cd5215888f281284d3910c212.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchgithub/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix
index 37f7dcfa3006..4ce3c6e84d76 100644
--- a/pkgs/build-support/fetchgithub/default.nix
+++ b/pkgs/build-support/fetchgithub/default.nix
@@ -28,7 +28,11 @@ let
   useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != []);
   # We prefer fetchzip in cases we don't need submodules as the hash
   # is more stable in that case.
-  fetcher = if useFetchGit then fetchgit else fetchzip.override { withUnzip = false; };
+  fetcher =
+    if useFetchGit then fetchgit
+    # fetchzip may not be overridable when using external tools, for example nix-prefetch
+    else if fetchzip ? override then fetchzip.override { withUnzip = false; }
+    else fetchzip;
   privateAttrs = lib.optionalAttrs private {
     netrcPhase = ''
       if [ -z "''$${varBase}USERNAME" -o -z "''$${varBase}PASSWORD" ]; then