node.js: copy v8 headers
most npm's that want to build binary stuff (bindings) look for the v8 headers at NODE_BINARY_PATH/../include Ideally, we get something like npm2nix someday and fix these build scripts. Until then, this little hack does the trick.
This commit is contained in:
parent
b659b026c5
commit
2cedd7021b
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, openssl, python, zlib, v8 }:
|
||||
{ stdenv, fetchurl, openssl, python, zlib, v8, linkV8Headers ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.6.19";
|
||||
|
@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postInstall = ''
|
||||
sed -e 's|^#!/usr/bin/env node$|#!'$out'/bin/node|' -i $out/lib/node_modules/npm/bin/npm-cli.js
|
||||
'' + stdenv.lib.optionalString linkV8Headers '' # helps binary npms
|
||||
ln -s ${v8}/include/* $out/include
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue