My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/libraries/v8/default.nix

36 lines
1.0 KiB

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