about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2024-01-16 05:52:01 +0100
committerVladimír Čunát <v@cunat.cz>2024-01-16 05:52:01 +0100
commit141a1ec41df16831e96abdae72b0828bfe2845e7 (patch)
tree75deceb7caeb06e12257f5f245030c44b4db7f65 /pkgs/build-support
parent74754d51da66aba446d22732651d4f8500242043 (diff)
parent71a024e1f6e0d2263b5249d65b92ef5c14010a79 (diff)
downloadnixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.tar
nixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.tar.gz
nixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.tar.bz2
nixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.tar.lz
nixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.tar.xz
nixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.tar.zst
nixlib-141a1ec41df16831e96abdae72b0828bfe2845e7.zip
Merge #279934: fetchFromGitHub: drop unzip
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchgithub/default.nix2
-rw-r--r--pkgs/build-support/fetchzip/default.nix4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix
index 231c0fb622b9..37f7dcfa3006 100644
--- a/pkgs/build-support/fetchgithub/default.nix
+++ b/pkgs/build-support/fetchgithub/default.nix
@@ -28,7 +28,7 @@ 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;
+  fetcher = if useFetchGit then fetchgit else fetchzip.override { withUnzip = false; };
   privateAttrs = lib.optionalAttrs private {
     netrcPhase = ''
       if [ -z "''$${varBase}USERNAME" -o -z "''$${varBase}PASSWORD" ]; then
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index 6e6c5270a750..dd04ccb6e093 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -5,7 +5,7 @@
 # (e.g. due to minor changes in the compression algorithm, or changes
 # in timestamps).
 
-{ lib, fetchurl, unzip, glibcLocalesUtf8 }:
+{ lib, fetchurl, withUnzip ? true, unzip, glibcLocalesUtf8 }:
 
 { name ? "source"
 , url ? ""
@@ -42,7 +42,7 @@ fetchurl ({
   # Have to pull in glibcLocalesUtf8 for unzip in setup-hook.sh to handle
   # UTF-8 aware locale:
   #   https://github.com/NixOS/nixpkgs/issues/176225#issuecomment-1146617263
-  nativeBuildInputs = [ unzip glibcLocalesUtf8 ] ++ nativeBuildInputs;
+  nativeBuildInputs = lib.optionals withUnzip [ unzip glibcLocalesUtf8 ] ++ nativeBuildInputs;
 
   postFetch =
     ''