v8: upgraded to latest stable 3.6 version (which node.js uses)

svn path=/nixpkgs/trunk/; revision=31649
This commit is contained in:
Peter Simons 2012-01-18 20:32:23 +00:00
parent 3eca1b395f
commit 7abb4986a2

View File

@ -1,25 +1,27 @@
{ stdenv, fetchsvn, python, scons, makeWrapper }: { stdenv, fetchsvn, python, scons, readline, makeWrapper }:
assert readline != null;
let let
system = stdenv.system; system = stdenv.system;
arch = if system == "i686-linux" then "ia32" else if system == "x86_64-linux" then "x64" else ""; arch = if system == "i686-linux" then "ia32" else if system == "x86_64-linux" then "x64" else "";
version = "3.6.6.17";
in in
assert system == "i686-linux" || system == "x86_64-linux"; assert system == "i686-linux" || system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "v8-r${toString src.rev}"; name = "v8-${version}";
src = fetchsvn { src = fetchsvn {
url = http://v8.googlecode.com/svn/trunk ; url = "http://v8.googlecode.com/svn/tags/${version}";
sha256 = "1p51zh1l9c2gq3g4qk713n6qki9by3llx4p46inncvqfrimgshxb"; sha256 = "7080d53b9d3aefc591c2e181dcf97d538ce36177284fc658eca6420ea36a926f";
rev = 5865;
}; };
buildInputs = [python scons makeWrapper]; buildInputs = [python scons readline makeWrapper];
buildPhase = '' buildPhase = ''
export CXX=`type -p g++` export CXX=`type -p g++`
scons snapshot=on importenv=PATH arch=${arch} export CPPPATH=${readline}/include
scons snapshot=on library=shared importenv=PATH arch=${arch} export LIBPATH=${readline}/lib
scons sample=shell snapshot=on importenv=PATH arch=${arch} scons snapshot=on console=readline library=shared importenv=PATH arch=${arch} library d8
''; '';
installPhase = '' installPhase = ''
@ -27,9 +29,8 @@ stdenv.mkDerivation rec {
ensureDir $out/lib ensureDir $out/lib
cp -v libv8.* $out/lib cp -v libv8.* $out/lib
cp -v shell $out/bin/v8-shell cp -v d8 $out/bin/d8
cp -vR include $out/ cp -vR include $out/
wrapProgram $out/bin/v8-shell --set LD_LIBRARY_PATH $out/lib wrapProgram $out/bin/d8 --set LD_LIBRARY_PATH $out/lib
''; '';
} }