3
0
Fork 0
forked from mirrors/nixpkgs

Added setup hook that adds a Node package automatically to NODE_PATH, if included in the buildInputs parameter

This commit is contained in:
Sander van der Burg 2013-02-04 15:21:33 +01:00
parent 805b7783d4
commit c89187cc3c
2 changed files with 7 additions and 0 deletions

View file

@ -32,6 +32,8 @@ stdenv.mkDerivation rec {
buildInputs = [ python openssl v8 zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
description = "Event-driven I/O framework for the V8 JavaScript engine";
homepage = http://nodejs.org;

View file

@ -0,0 +1,5 @@
addNodePath () {
addToSearchPath NODE_PATH $1/node_modules
}
envHooks=(${envHooks[@]} addNodePath)