mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-30 10:07:33 +03:00
fix unpackging tgz with broken permissions
This commit is contained in:
parent
f30b6759f4
commit
8189d77a7e
@ -140,10 +140,16 @@ let
|
||||
|
||||
# costs performance and doesn't seem beneficial in most scenarios
|
||||
dontStrip = true;
|
||||
|
||||
# The default unpackPhase seemed to fail on setting permissions
|
||||
# for some packages.
|
||||
# TODO: debug nixpkgs unpackPhase and upstream improvement.
|
||||
|
||||
# TODO: upstream fix to nixpkgs
|
||||
# example which requires this:
|
||||
# https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.7.tgz
|
||||
unpackCmd =
|
||||
if lib.hasSuffix ".tgz" src then
|
||||
"tar --delay-directory-restore -xf $src"
|
||||
else
|
||||
null;
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
|
||||
@ -153,8 +159,8 @@ let
|
||||
|
||||
unpackFile $src
|
||||
|
||||
# Make the base dir in which the target dependency resides first
|
||||
mkdir -p "$(dirname "$nodeModules/$packageName")"
|
||||
# Make the base dir in which the target dependency resides in first
|
||||
mkdir -p "$(dirname "$sourceRoot")"
|
||||
|
||||
# install source
|
||||
if [ -f "$src" ]
|
||||
@ -252,7 +258,7 @@ let
|
||||
'';
|
||||
|
||||
# Run the install command which defaults to 'npm run postinstall'.
|
||||
# Set alternative install command by overriding 'installScript'.
|
||||
# Allows using custom install command by overriding 'installScript'.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user