diff options
author | Jan Malakhovski <oxij@oxij.org> | 2021-02-05 13:08:57 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2021-02-05 13:08:57 +0000 |
commit | 2b94e5d934bb945d1d657be23a6201dd56980c64 (patch) | |
tree | bc21c50750ab66f93642a3a399fb6c444b710e87 /pkgs/build-support | |
parent | dcb6103bf2d6bcb9bac2b86aef3a9a4a39e37f6d (diff) | |
download | nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.tar nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.gz nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.bz2 nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.lz nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.xz nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.tar.zst nixlib-2b94e5d934bb945d1d657be23a6201dd56980c64.zip |
fetchzip: simplify `postFetch` as per suggestions
of @veprbl, @adisbladis, and @MetaDark
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchzip/default.nix | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix index d2f3bb48bbc2..b00983772e4b 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 |