forked from mirrors/nixpkgs
fetchzip: simplify postFetch
as per suggestions
of @veprbl, @adisbladis, and @MetaDark
This commit is contained in:
parent
dcb6103bf2
commit
2b94e5d934
1 changed files with 5 additions and 11 deletions
|
@ -47,17 +47,11 @@
|
||||||
'')
|
'')
|
||||||
+ ''
|
+ ''
|
||||||
${extraPostFetch}
|
${extraPostFetch}
|
||||||
|
''
|
||||||
# Remove write permissions for files unpacked with write bits set
|
# Remove non-owner write permissions
|
||||||
# Fixes https://github.com/NixOS/nixpkgs/issues/38649
|
# Fixes https://github.com/NixOS/nixpkgs/issues/38649
|
||||||
#
|
+ ''
|
||||||
# However, we should (for the moment) retain write permission on the directory
|
chmod 755 "$out"
|
||||||
# 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: {
|
} // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: {
|
||||||
# Hackety-hack: we actually need unzip hooks, too
|
# Hackety-hack: we actually need unzip hooks, too
|
||||||
|
|
Loading…
Add table
Reference in a new issue