From 10447c69004b5417a5220ee2f32d0bf9e5478249 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 15 Oct 2016 18:44:54 +0300 Subject: [PATCH] buildNodePackage: fix strippedName usage --- pkgs/development/node-packages/node-env.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix index c5c69c7d05d7..fd3e710b16e2 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}"