mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
buildNodePackage: Utilize the node setup hook
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
2f024a2ea9
commit
d749196f68
1 changed files with 8 additions and 2 deletions
|
@ -26,7 +26,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
${nodejs}/bin/npm --registry http://www.example.com --nodedir=${sources} install ${src} ${npmFlags}
|
npm --registry http://www.example.com --nodedir=${sources} install ${src} ${npmFlags}
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -47,4 +47,10 @@ stdenv.mkDerivation ({
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
find $out -type f -print0 | xargs -0 sed -i 's|${src}|${src.name}|g'
|
find $out -type f -print0 | xargs -0 sed -i 's|${src}|${src.name}|g'
|
||||||
'';
|
'';
|
||||||
} // args)
|
} // args // {
|
||||||
|
# Run the node setup hook when this package is a build input
|
||||||
|
propagatedNativeBuildInputs = (args.propagatedNativeBuildInputs or []) ++ [ nodejs ];
|
||||||
|
|
||||||
|
# Make buildNodePackage useful with --run-env
|
||||||
|
nativeBuildInputs = (args.nativeBuildInputs or []) ++ deps;
|
||||||
|
} )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue