buildNodePackage: fix strippedName usage
This commit is contained in:
parent
d91365d714
commit
10447c6900
@ -121,7 +121,7 @@ let
|
||||
if [ -f "${src}" ]
|
||||
then
|
||||
# Figure out what directory has been unpacked
|
||||
packageDir=$(find . -type d -maxdepth 1 | tail -1)
|
||||
packageDir="$(find . -type d -maxdepth 1 | tail -1)"
|
||||
|
||||
# Restore write permissions to make building work
|
||||
find "$packageDir" -type d -print0 | xargs -0 chmod u+x
|
||||
@ -131,6 +131,8 @@ let
|
||||
mv "$packageDir" "$DIR/${packageName}"
|
||||
elif [ -d "${src}" ]
|
||||
then
|
||||
strippedName="$(stripHash ${src})"
|
||||
|
||||
# Restore write permissions to make building work
|
||||
chmod -R u+w $strippedName
|
||||
|
||||
@ -138,9 +140,6 @@ let
|
||||
mv $strippedName "$DIR/${packageName}"
|
||||
fi
|
||||
|
||||
# Unset the stripped name to not confuse the next unpack step
|
||||
unset strippedName
|
||||
|
||||
# Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
|
||||
# The following JavaScript replaces these by * to prevent that
|
||||
cd "$DIR/${packageName}"
|
||||
|
Loading…
Reference in New Issue
Block a user