diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix index c5c69c7d05d..fd3e710b16e 100644 --- a/pkgs/development/node-packages/node-env.nix +++ b/pkgs/development/node-packages/node-env.nix @@ -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}"