summary refs log tree commit diff
path: root/pkgs/build-support/fetchzip
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2021-02-05 13:08:57 +0000
committerJan Malakhovski <oxij@oxij.org>2021-02-05 13:08:57 +0000
commit2b94e5d934bb945d1d657be23a6201dd56980c64 (patch)
treebc21c50750ab66f93642a3a399fb6c444b710e87 /pkgs/build-support/fetchzip
parentdcb6103bf2d6bcb9bac2b86aef3a9a4a39e37f6d (diff)
downloadnixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.tar
nixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.gz
nixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.bz2
nixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.lz
nixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.xz
nixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.zst
nixpkgs-2b94e5d934bb945d1d657be23a6201dd56980c64.zip
fetchzip: simplify `postFetch` as per suggestions
of @veprbl, @adisbladis, and @MetaDark
Diffstat (limited to 'pkgs/build-support/fetchzip')
-rw-r--r--pkgs/build-support/fetchzip/default.nix16
1 files changed, 5 insertions, 11 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index d2f3bb48bbc..b00983772e4 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -47,17 +47,11 @@
     '')
     + ''
       ${extraPostFetch}
-
-      # Remove write permissions for files unpacked with write bits set
-      # Fixes https://github.com/NixOS/nixpkgs/issues/38649
-      #
-      # However, we should (for the moment) retain write permission on the directory
-      # itself, to avoid tickling https://github.com/NixOS/nix/issues/4295 in
-      # single-user Nix installations. This is because in sandbox mode we'll try to
-      # move the path, and if we don't have write permissions on the directory,
-      # then we can't update the ".." entry.
-      chmod -R a-w "$out"
-      chmod u+w "$out"
+    ''
+    # Remove non-owner write permissions
+    # Fixes https://github.com/NixOS/nixpkgs/issues/38649
+    + ''
+      chmod 755 "$out"
     '';
 } // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: {
   # Hackety-hack: we actually need unzip hooks, too