From 2b94e5d934bb945d1d657be23a6201dd56980c64 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 5 Feb 2021 13:08:57 +0000 Subject: fetchzip: simplify `postFetch` as per suggestions of @veprbl, @adisbladis, and @MetaDark --- pkgs/build-support/fetchzip/default.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'pkgs/build-support/fetchzip') 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 -- cgit 1.4.1