Making 'npm' work from commandline (fix interpreter).

This commit is contained in:
Lluís Batlle 2012-06-21 22:10:06 +02:00
parent 2057d7b14b
commit b293ced9a8

View File

@ -23,7 +23,9 @@ stdenv.mkDerivation rec {
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i tools/{*.py,waf-light,node-waf} sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i tools/{*.py,waf-light,node-waf}
''; '';
postInstall = stdenv.lib.optionalString stdenv.isDarwin '' postInstall = ''
sed -e 's|^#!/usr/bin/env node$|#!'$out'/bin/node|' -i $out/lib/node_modules/npm/bin/npm-cli.js
'' + 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
''; '';