nodePackages.parsoid: init

This commit is contained in:
Nikolay Amiantov 2016-11-03 18:09:06 +03:00
parent 9ffcb1b250
commit e829d82861
3 changed files with 1174 additions and 516 deletions

View File

@ -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 . -maxdepth 1 -type d | tail -1)"
# Restore write permissions to make building work
find "$packageDir" -type d -print0 | xargs -0 chmod u+x
@ -131,11 +131,18 @@ let
mv "$packageDir" "$DIR/${packageName}"
elif [ -d "${src}" ]
then
# Get a stripped name (without hash) of the source directory.
# On old nixpkgs it's already set internally.
if [ -z "$strippedName" ]
then
strippedName="$(stripHash ${src})"
fi
# Restore write permissions to make building work
chmod -R u+w $strippedName
chmod -R u+w "$strippedName"
# Move the extracted directory into the output folder
mv $strippedName "$DIR/${packageName}"
mv "$strippedName" "$DIR/${packageName}"
fi
# Unset the stripped name to not confuse the next unpack step
@ -205,6 +212,9 @@ let
if [ "$dontNpmInstall" != "1" ]
then
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
fi
@ -261,10 +271,13 @@ let
# calling executables outside the Nix store as much as possible
patchShebangs .
export HOME=$TMPDIR
export HOME=$PWD
npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
${stdenv.lib.optionalString (!dontNpmInstall) ''
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
''}

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,7 @@
, "npm"
, { "npm2nix": "git://github.com/NixOS/npm2nix.git#5.12.0" }
, "npm-check-updates"
, "parsoid"
, "peerflix"
, "peerflix-server"
, "phantomjs"