mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
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,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, openssl, python, zlib, v8 }:
|
{ stdenv, fetchurl, openssl, python, zlib, v8, linkV8Headers ? false }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.6.19";
|
version = "0.6.19";
|
||||||
@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
sed -e 's|^#!/usr/bin/env node$|#!'$out'/bin/node|' -i $out/lib/node_modules/npm/bin/npm-cli.js
|
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 ''
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
|
install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user