2012-07-25 15:42:15 +00:00
|
|
|
{ stdenv, fetchsvn, gyp, readline, python }:
|
2012-01-18 20:32:23 +00:00
|
|
|
|
|
|
|
assert readline != null;
|
2010-11-22 14:23:06 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
system = stdenv.system;
|
2012-02-10 05:22:58 +00:00
|
|
|
arch = if system == "i686-linux" then "ia32" else if system == "x86_64-linux" || system == "x86_64-darwin" then "x64" else "";
|
2012-07-25 14:26:34 +00:00
|
|
|
version = "3.11.10.15";
|
2010-11-22 14:23:06 +00:00
|
|
|
in
|
2012-07-25 15:42:15 +00:00
|
|
|
|
2012-02-10 05:22:58 +00:00
|
|
|
assert arch != "";
|
2012-07-25 15:42:15 +00:00
|
|
|
|
2010-11-22 14:23:06 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-01-18 20:32:23 +00:00
|
|
|
name = "v8-${version}";
|
2010-11-22 14:23:06 +00:00
|
|
|
src = fetchsvn {
|
2012-01-18 20:32:23 +00:00
|
|
|
url = "http://v8.googlecode.com/svn/tags/${version}";
|
2012-07-25 14:26:34 +00:00
|
|
|
sha256 = "0pdw4r6crsb07gshww4kbfbavxgkal8yaxkaggnkz62lrwbcwrwi";
|
2010-11-22 14:23:06 +00:00
|
|
|
};
|
2012-01-18 20:32:23 +00:00
|
|
|
|
2012-07-25 15:42:15 +00:00
|
|
|
configurePhase = ''
|
|
|
|
mkdir build/gyp
|
|
|
|
ln -sv ${gyp}/bin/gyp build/gyp/gyp
|
2010-11-22 14:23:06 +00:00
|
|
|
'';
|
2012-01-18 20:32:23 +00:00
|
|
|
|
2012-07-25 15:42:15 +00:00
|
|
|
buildInputs = [ readline python ];
|
|
|
|
|
|
|
|
buildFlags = [
|
|
|
|
"library=shared"
|
|
|
|
"console=readline"
|
|
|
|
"${arch}.release"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2010-11-22 14:23:06 +00:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/lib
|
2012-07-25 15:42:15 +00:00
|
|
|
mv -v out/${arch}.release/d8 $out/bin
|
|
|
|
mv -v out/${arch}.release/lib.target/libv8.so $out/lib
|
|
|
|
mv -v include $out/
|
2010-11-22 14:23:06 +00:00
|
|
|
'';
|
|
|
|
}
|