diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-10-15 18:44:54 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-10-15 18:45:48 +0300 |
commit | 10447c69004b5417a5220ee2f32d0bf9e5478249 (patch) | |
tree | 60a5a990bbe06cc3e05d59b3d42caf1e04da53d1 /pkgs | |
parent | d91365d71407ada863fa0f6d1b2406800b42df43 (diff) | |
download | nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.tar nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.tar.gz nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.tar.bz2 nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.tar.lz nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.tar.xz nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.tar.zst nixlib-10447c69004b5417a5220ee2f32d0bf9e5478249.zip |
buildNodePackage: fix strippedName usage
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/node-packages/node-env.nix | 7 |
1 files 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}" |