Update nodePackages to npm2nix-5.2.0

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-11-05 18:02:16 -05:00
parent 1045df3197
commit 9817bada91
3 changed files with 4621 additions and 7616 deletions

View File

@ -11,6 +11,11 @@ let
tar xf ${nodejs.src} tar xf ${nodejs.src}
mv *node* $out mv *node* $out
''; '';
peerDeps = listToAttrs (concatMap (dep: map (name: {
inherit name;
value = dep;
}) (filter (nm: !(elem nm (args.passthru.names or []))) dep.names)) (peerDependencies));
in in
stdenv.mkDerivation ({ stdenv.mkDerivation ({
unpackPhase = "true"; unpackPhase = "true";
@ -21,9 +26,9 @@ stdenv.mkDerivation ({
${concatStrings (concatMap (dep: map (name: '' ${concatStrings (concatMap (dep: map (name: ''
ln -sv ${dep}/lib/node_modules/${name} node_modules/ ln -sv ${dep}/lib/node_modules/${name} node_modules/
'') dep.names) deps)} '') dep.names) deps)}
${concatStrings (concatMap (dep: map (name: '' ${concatStrings (mapAttrsToList (name: dep: ''
ln -sv ${dep}/lib/node_modules/${name} node_modules/ ln -sv ${dep}/lib/node_modules/${name} node_modules/
'') dep.names) peerDependencies)} '') peerDeps)}
export HOME=$(pwd) export HOME=$(pwd)
runHook postConfigure runHook postConfigure
''; '';
@ -51,9 +56,9 @@ stdenv.mkDerivation ({
done done
fi fi
'') args.passthru.names)} '') args.passthru.names)}
${concatStrings (concatMap (dep: map (name: '' ${concatStrings (mapAttrsToList (name: dep: ''
mv node_modules/${name} $out/lib/node_modules mv node_modules/${name} $out/lib/node_modules
'') dep.names) peerDependencies)} '') peerDeps)}
mv node_modules/.bin $out/lib/node_modules 2>/dev/null || true mv node_modules/.bin $out/lib/node_modules 2>/dev/null || true
mv node_modules $out/.dependent-node-modules mv node_modules $out/.dependent-node-modules
if [ -d "$out/lib/node_modules/.bin" ]; then if [ -d "$out/lib/node_modules/.bin" ]; then

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@
{ {
nativeDeps = { nativeDeps = {
"node-expat"."*" = [ pkgs.expat ]; "node-expat" = [ pkgs.expat ];
"rbytes"."*" = [ pkgs.openssl ]; "rbytes" = [ pkgs.openssl ];
"phantomjs"."~1.9" = [ pkgs.phantomjs ]; "phantomjs" = [ pkgs.phantomjs ];
}; };
buildNodePackage = import ../development/web/nodejs/build-node-package.nix { buildNodePackage = import ../development/web/nodejs/build-node-package.nix {