Added setup hook that adds a Node package automatically to NODE_PATH, if included in the buildInputs parameter
This commit is contained in:
@@ -32,6 +32,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ python openssl v8 zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
|
buildInputs = [ python openssl v8 zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
|
||||||
|
|
||||||
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Event-driven I/O framework for the V8 JavaScript engine";
|
description = "Event-driven I/O framework for the V8 JavaScript engine";
|
||||||
homepage = http://nodejs.org;
|
homepage = http://nodejs.org;
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
addNodePath () {
|
||||||
|
addToSearchPath NODE_PATH $1/node_modules
|
||||||
|
}
|
||||||
|
|
||||||
|
envHooks=(${envHooks[@]} addNodePath)
|
||||||
Reference in New Issue
Block a user