@@ -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