git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #105845 from lukegb/singleuser-fetchzip

fetchzip: get write permission on unpacked directory

commitb65e82c7a07065540e7b0acd4fd2cb21cf57c096 authorBenjamin Hipple <bhipple@protonmail.com> dateSat 5 Dec 2020, 06:52 (6 years ago) parent956e6421f6d750
1 file changed+7
pkgs/build-support/fetchzip/default.nix+7
pkgs/build-support/fetchzip/default.nix+7
@@ -48,8 +48,15 @@
4848 + extraPostFetch
4949 # Remove write permissions for files unpacked with write bits set
5050 # Fixes https://github.com/NixOS/nixpkgs/issues/38649
51+ #
52+ # However, we should (for the moment) retain write permission on the directory
53+ # itself, to avoid tickling https://github.com/NixOS/nix/issues/4295 in
54+ # single-user Nix installations. This is because in sandbox mode we'll try to
55+ # move the path, and if we don't have write permissions on the directory,
56+ # then we can't update the ".." entry.
5157 + ''
5258 chmod -R a-w "$out"
59+ chmod u+w "$out"
5360 '';
5461} // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: {
5562 # Hackety-hack: we actually need unzip hooks, too