summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-09-04 21:26:18 -0400
committerShea Levy <shea@shealevy.com>2016-09-04 21:26:18 -0400
commit224889e452fcf1067a94bb014dd266aca2c3eec8 (patch)
treea03f76962894026ac04ad0d74ca3ca71eece9e1f /pkgs
parent845cb949fca5fdfc56749e092a67c22f0e4515f7 (diff)
parentc76c0bedc10a5443bce53915cb77b1c3dd89b2b0 (diff)
downloadnixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.tar
nixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.tar.gz
nixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.tar.bz2
nixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.tar.lz
nixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.tar.xz
nixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.tar.zst
nixlib-224889e452fcf1067a94bb014dd266aca2c3eec8.zip
Merge branch 'php-javascript-extensions' of git://github.com/stesie/nixpkgs
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/top-level/php-packages.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index e8af3c2dbf9b..9bebfa3d9158 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -81,6 +81,19 @@ let
     buildInputs = with pkgs; [ pkgconfig cyrus_sasl ];
   };
 
+  # No support for PHP 7 yet (and probably never will be)
+  spidermonkey = assert !isPhp7; buildPecl rec {
+    name = "spidermonkey-1.0.0";
+
+    sha256 = "1ywrsp90w6rlgq3v2vmvp2zvvykkgqqasab7h9bf3vgvgv3qasbg";
+
+    configureFlags = [
+      "--with-spidermonkey=${pkgs.spidermonkey_185}"
+    ];
+
+    buildInputs = [ pkgs.spidermonkey_185 ];
+  };
+
   xdebug = if isPhp7 then xdebug24 else xdebug23;
 
   xdebug23 = assert !isPhp7; buildPecl {
@@ -207,6 +220,47 @@ let
     };
   };
 
+  v8 = assert isPhp7; buildPecl rec {
+    version = "0.1.0";
+    name = "v8-${version}";
+
+    src = pkgs.fetchurl {
+      url = "https://github.com/pinepain/php-v8/archive/v${version}.tar.gz";
+      sha256 = "18smnxd34b486f5n8j0wk9z7r5x1w84v89mgf76z0bn7gxdxl0xj";
+    };
+
+    buildInputs = [ pkgs.v8 ];
+    configureFlags = [ "--with-v8=${pkgs.v8}" ];
+
+    patches = [
+      (builtins.toFile "link-libv8_libbase.patch" ''
+        Index: php-v8/config.m4
+        ===================================================================
+        --- php-v8.orig/config.m4
+        +++ php-v8/config.m4
+        @@ -69,7 +69,7 @@ if test "$PHP_V8" != "no"; then
+               #static_link_extra="libv8_base.a libv8_libbase.a libv8_libplatform.a libv8_snapshot.a"
+               ;;
+             * )
+        -      static_link_extra="libv8_libplatform.a"
+        +      static_link_extra="libv8_libplatform.a libv8_libbase.a"
+               #static_link_extra="libv8_base.a libv8_libbase.a libv8_libplatform.a libv8_snapshot.a"
+               ;;
+           esac
+	''
+      )];
+  };
+
+  v8js = assert isPhp7; buildPecl rec {
+    version = "1.3.2";
+    name = "v8js-${version}";
+
+    sha256 = "1x7gxi70zgj3vaxs89nfbnwlqcxrps1inlyfzz66pbzdbfwvc8z8";
+
+    buildInputs = [ pkgs.v8 ];
+    configureFlags = [ "--with-v8js=${pkgs.v8}" ];
+  };
+
   composer = pkgs.stdenv.mkDerivation rec {
     name = "composer-${version}";
     version = "1.2.0";