diff options
-rw-r--r-- | pkgs/development/libraries/v8/3.14.nix | 65 | ||||
-rw-r--r-- | pkgs/development/web/nodejs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/nosql/mongodb/default.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/nosql/rethinkdb/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
5 files changed, 78 insertions, 7 deletions
diff --git a/pkgs/development/libraries/v8/3.14.nix b/pkgs/development/libraries/v8/3.14.nix new file mode 100644 index 000000000000..0564e6887957 --- /dev/null +++ b/pkgs/development/libraries/v8/3.14.nix @@ -0,0 +1,65 @@ +{ stdenv, fetchsvn, gyp, readline, python, which }: + +assert readline != null; + +let + system = stdenv.system; + arch = if system == "i686-linux" then "ia32" else if system == "x86_64-linux" || system == "x86_64-darwin" then "x64" else ""; + version = "3.14.5.9"; +in + +assert arch != ""; + +stdenv.mkDerivation { + name = "v8-${version}"; + + src = fetchsvn { + url = "http://v8.googlecode.com/svn/tags/${version}"; + sha256 = "18qp5qp5xrb6f00w01cklz358yrl54pks963f5rwvwz82d8sfyqr"; + name = "v8-${version}-src"; + }; + + patches = [ ./fix-GetLocalizedMessage-usage.patch ]; + + configurePhase = '' + mkdir build/gyp + ln -sv ${gyp}/bin/gyp build/gyp/gyp + ''; + + nativeBuildInputs = [ which ]; + buildInputs = [ readline python ]; + + buildFlags = [ + "library=shared" + "console=readline" + "${arch}.release" + ]; + + # http://code.google.com/p/v8/issues/detail?id=2149 + NIX_CFLAGS_COMPILE = "-Wno-unused-local-typedefs -Wno-aggressive-loop-optimizations"; + + enableParallelBuilding = true; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/lib + mv -v out/${arch}.release/d8 $out/bin + + ${if stdenv.system == "x86_64-darwin" then + "mv -v out/${arch}.release/libv8.dylib $out/lib" + else + "mv -v out/${arch}.release/lib.target/libv8.so $out/lib"} + mv -v include $out/ + ''; + + postFixup = if stdenv.isDarwin then '' + install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8 + install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib + '' else null; + + meta = with stdenv.lib; { + description = "V8 is Google's open source JavaScript engine"; + platforms = platforms.linux ++ platforms.darwin; + license = licenses.bsd3; + }; +} diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix index 062d7f4ec066..3b1b64679722 100644 --- a/pkgs/development/web/nodejs/default.nix +++ b/pkgs/development/web/nodejs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, python, zlib, v8, utillinux, http-parser, c-ares, pkgconfig, runCommand }: +{ stdenv, fetchurl, openssl, python, zlib, v8_3_14, utillinux, http-parser, c-ares, pkgconfig, runCommand }: let dtrace = runCommand "dtrace-native" {} '' @@ -10,7 +10,7 @@ let # !!! Should we also do shared libuv? deps = { - inherit v8 openssl zlib http-parser; + inherit v8_3_14 openssl zlib http-parser; cares = c-ares; }; diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix index 6956271e992c..a5a021b93545 100644 --- a/pkgs/servers/nosql/mongodb/default.nix +++ b/pkgs/servers/nosql/mongodb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, scons, boost, v8, gperftools, pcre, snappy }: +{ stdenv, fetchurl, scons, boost, v8_3_14, gperftools, pcre, snappy }: let version = "2.4.8"; in stdenv.mkDerivation rec { name = "mongodb-${version}"; @@ -8,7 +8,7 @@ let version = "2.4.8"; in stdenv.mkDerivation rec { sha256 = "1p6gnharypglfp39halp72fig96fqjhakyy7m76a1prxwpjkqw7x"; }; - nativeBuildInputs = [ scons boost v8 gperftools pcre snappy ]; + nativeBuildInputs = [ scons boost v8_3_14 gperftools pcre snappy ]; postPatch = '' substituteInPlace SConstruct \ diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix index e81ccb396322..ec1dbd763646 100644 --- a/pkgs/servers/nosql/rethinkdb/default.nix +++ b/pkgs/servers/nosql/rethinkdb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, which, protobuf, v8, ncurses, gperftools, boost, m4 }: +{ stdenv, fetchurl, which, protobuf, v8_3_14, ncurses, gperftools, boost, m4 }: stdenv.mkDerivation rec { name = "rethinkdb-1.11.2"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { configureFlags = "--lib-path ${gperftools}/lib"; - buildInputs = [ protobuf v8 ncurses boost ]; + buildInputs = [ protobuf v8_3_14 ncurses boost ]; nativeBuildInputs = [ which m4 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79c1ce219dab..8a498067d586 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6147,7 +6147,13 @@ let inherit (gnome) libsoup; }; - v8 = callPackage ../development/libraries/v8 { inherit (pythonPackages) gyp; }; + v8 = callPackage ../development/libraries/v8 { + inherit (pythonPackages) gyp; + }; + + v8_3_14 = callPackage ../development/libraries/v8/3.14.nix { + inherit (pythonPackages) gyp; + }; xmlsec = callPackage ../development/libraries/xmlsec { }; |