summaryrefslogtreecommitdiffstats
path: root/pkgs/build-support/fetchzip/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/fetchzip/default.nix')
-rw-r--r--pkgs/build-support/fetchzip/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index a3f22de58c71..98c410370746 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -12,6 +12,7 @@
, url ? ""
, urls ? []
, extraPostFetch ? ""
+, postFetch ? ""
, name ? "source"
, nativeBuildInputs ? [ ]
, # Allows to set the extension for the intermediate downloaded
@@ -20,6 +21,8 @@
extension ? null
, ... } @ args:
+
+lib.warnIf (extraPostFetch != "") "use 'postFetch' instead of 'extraPostFetch' with 'fetchzip' and 'fetchFromGitHub'."
(fetchurl (let
tmpFilename =
if extension != null
@@ -60,11 +63,14 @@ in {
mv "$unpackDir" "$out"
'')
+ ''
+ ${postFetch}
+ '' + ''
${extraPostFetch}
''
+
# Remove non-owner write permissions
# Fixes https://github.com/NixOS/nixpkgs/issues/38649
+ ''
chmod 755 "$out"
'';
-} // removeAttrs args [ "stripRoot" "extraPostFetch" "extension" "nativeBuildInputs" ]))
+} // removeAttrs args [ "stripRoot" "extraPostFetch" "postFetch" "extension" "nativeBuildInputs" ]))