[Nix-dev] [PATCH 2/2] t/v8-google-js-engine

Marc Weber marco-oweber at gmx.de
Mon Sep 27 01:18:29 CEST 2010


adding Google's open source JavaScript engine *V8"

Signed-off-by: Marc Weber <marco-oweber at gmx.de>
---
 pkgs/development/interpreters/v8/default.nix |   41 ++++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix              |    2 +
 2 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 pkgs/development/interpreters/v8/default.nix

diff --git a/pkgs/development/interpreters/v8/default.nix b/pkgs/development/interpreters/v8/default.nix
new file mode 100644
index 0000000..9ed492a
--- /dev/null
+++ b/pkgs/development/interpreters/v8/default.nix
@@ -0,0 +1,41 @@
+{stdenv, fetchurl, scons, python, sourceFromHead}:
+
+assert stdenv.system == "i686-linux";
+
+stdenv.mkDerivation {
+
+  name = "v8";
+
+  enableParallelBuilding = true;
+
+  # REGION AUTO UPDATE: { name="v8"; type="svn"; url="http://v8.googlecode.com/svn/trunk"; }
+  src = sourceFromHead "v8-5455.tar.gz"
+               (throw "source not not published yet: v8");
+  # END
+  
+  buildInputs = [scons python];
+
+
+  # not used scons flags
+  # library=shared
+  # snapshot=on (would make startup faster, but increase executable file size by 160kb
+  # see http://code.google.com/apis/v8/build.html
+  # TODO copy license to $out
+  buildPhase  = ''
+    scons    # build library
+    scons d8 # build executable
+    ensureDir $out/{bin,lib}
+    cp d8 $out/bin
+    cp lib* $out/lib
+  '';
+  
+  installPhase = ":";
+
+  meta = {
+    description = "Google's open source JavaScript engine (executable and library)";
+    homepage = http://code.google.com/p/v8;
+    license = "BSD";
+    maintainers = [stdenv.lib.maintainers.marcweber];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index acb9e21..d70ea75 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2159,6 +2159,8 @@ let
 
   tcl = callPackage ../development/interpreters/tcl { };
 
+  v8 = callPackage ../development/interpreters/v8 { };
+
   xulrunnerWrapper = {application, launcher}:
     import ../development/interpreters/xulrunner/wrapper {
       inherit stdenv application launcher;
-- 
1.7.2.1




More information about the nix-dev mailing list