about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2020-12-05 12:18:20 +0000
committerGitHub <noreply@github.com>2020-12-05 12:18:20 +0000
commit899d916e1d690cb6391e716cf5d9d3f7aa73789f (patch)
treef26975e0602ac29b6a193cf3e3473739100d571f /pkgs/build-support
parent6975e972c16e380f238f42840d0c18e3b060da6c (diff)
parent0947539ec1038d3ba1ca93e5a2ed972c2af7c12a (diff)
downloadnixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.tar
nixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.tar.gz
nixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.tar.bz2
nixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.tar.lz
nixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.tar.xz
nixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.tar.zst
nixlib-899d916e1d690cb6391e716cf5d9d3f7aa73789f.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchzip/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index 44748f231bc2..a1744b48deb9 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -48,8 +48,15 @@
     + 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"
     '';
 } // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: {
   # Hackety-hack: we actually need unzip hooks, too