about summary refs log tree commit diff
path: root/pkgs/development/libraries/v8
diff options
context:
space:
mode:
authorRob Vermaas <rob.vermaas@gmail.com>2010-11-22 14:23:06 +0000
committerRob Vermaas <rob.vermaas@gmail.com>2010-11-22 14:23:06 +0000
commit1c86c832c1c02946216e8eb36c855073b6bde72e (patch)
tree7dc59123b0304572dfa15176538863a03b602af7 /pkgs/development/libraries/v8
parent1af46c1160976ab4ca7df4e59803385f96cef4c3 (diff)
add google v8 engine
svn path=/nixpkgs/trunk/; revision=24809
Diffstat (limited to 'pkgs/development/libraries/v8')
-rw-r--r--pkgs/development/libraries/v8/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
new file mode 100644
index 0000000000000..766b6f382683d
--- /dev/null
+++ b/pkgs/development/libraries/v8/default.nix
@@ -0,0 +1,34 @@
+{ 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 abort "not supported"; 
+in
+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  
+     
+    '';
+}