phpPackages: init php56Packages and php70Packages

+122 -20
+9 -1
pkgs/top-level/all-packages.nix
··· 5201 5201 5202 5202 php = php56; 5203 5203 5204 - phpPackages = recurseIntoAttrs (callPackage ./php-packages.nix {}); 5204 + phpPackages = php56Packages; 5205 5205 5206 5206 php55Packages = recurseIntoAttrs (callPackage ./php-packages.nix { 5207 5207 php = php55; 5208 + }); 5209 + 5210 + php56Packages = recurseIntoAttrs (callPackage ./php-packages.nix { 5211 + php = php56; 5212 + }); 5213 + 5214 + php70Packages = recurseIntoAttrs (callPackage ./php-packages.nix { 5215 + php = php70; 5208 5216 }); 5209 5217 5210 5218 inherit (callPackages ../development/interpreters/php { })
+113 -19
pkgs/top-level/php-packages.nix
··· 1 - { pkgs, php }: 1 + { pkgs, fetchgit, php }: 2 + 3 + let 4 + self = with self; { 5 + buildPecl = import ../build-support/build-pecl.nix { 6 + inherit php; 7 + inherit (pkgs) stdenv autoreconfHook fetchurl; 8 + }; 9 + isPhpOlder55 = pkgs.lib.versionOlder php.version "5.5"; 10 + isPhp7 = pkgs.lib.versionAtLeast php.version "7.0"; 2 11 3 - let self = with self; { 4 - buildPecl = import ../build-support/build-pecl.nix { 5 - inherit php; 6 - inherit (pkgs) stdenv autoreconfHook fetchurl; 7 - }; 12 + apcu = if isPhp7 then apcu51 else apcu40; 8 13 9 - apcu = buildPecl { 14 + apcu40 = assert !isPhp7; buildPecl { 10 15 name = "apcu-4.0.7"; 11 16 12 17 sha256 = "1mhbz56mbnq7dryf2d64l84lj3fpr5ilmg2424glans3wcg772hp"; 13 18 }; 14 19 15 - imagick = buildPecl { 20 + apcu51 = assert isPhp7; buildPecl { 21 + name = "apcu-5.1.2"; 22 + 23 + sha256 = "0r5pfbjbmdj46h20jm3iqmy969qd27ajyf0phjhgykv6j0cqjlgd"; 24 + }; 25 + 26 + imagick = if isPhp7 then imagick34 else imagick31; 27 + 28 + imagick31 = assert !isPhp7; buildPecl { 16 29 name = "imagick-3.1.2"; 17 30 sha256 = "14vclf2pqcgf3w8nzqbdw0b9v30q898344c84jdbw2sa62n6k1sj"; 18 31 configureFlags = "--with-imagick=${pkgs.imagemagick}"; 19 32 buildInputs = [ pkgs.pkgconfig ]; 20 33 }; 21 34 22 - memcache = buildPecl { 35 + imagick34 = buildPecl { 36 + name = "imagick-3.4.0RC4"; 37 + sha256 = "0fdkzdv3r8sm6y1x11kp3rxsimq6zf15xvi0mhn57svmnan4zh0i"; 38 + configureFlags = "--with-imagick=${pkgs.imagemagick}"; 39 + buildInputs = [ pkgs.pkgconfig ]; 40 + }; 41 + 42 + # No support for PHP 7 yet 43 + memcache = assert !isPhp7; buildPecl { 23 44 name = "memcache-3.0.8"; 24 45 25 46 sha256 = "04c35rj0cvq5ygn2jgmyvqcb0k8d03v4k642b6i37zgv7x15pbic"; ··· 27 48 configureFlags = "--with-zlib-dir=${pkgs.zlib}"; 28 49 }; 29 50 30 - memcached = buildPecl { 51 + memcached = if isPhp7 then memcachedPhp7 else memcached22; 52 + 53 + memcached22 = assert !isPhp7; buildPecl { 31 54 name = "memcached-2.2.0"; 32 55 33 56 sha256 = "0n4z2mp4rvrbmxq079zdsrhjxjkmhz6mzi7mlcipz02cdl7n1f8p"; ··· 40 63 buildInputs = with pkgs; [ pkgconfig cyrus_sasl ]; 41 64 }; 42 65 43 - xdebug = buildPecl { 66 + # Not released yet 67 + memcachedPhp7 = assert isPhp7; buildPecl rec { 68 + name = "memcached-php7"; 69 + 70 + src = fetchgit { 71 + url = "https://github.com/php-memcached-dev/php-memcached"; 72 + rev = "e573a6e8fc815f12153d2afd561fc84f74811e2f"; 73 + sha256 = "f7acfdae04ef2ef9ece67b6d009aaf6604db64735fc7619f7169929aabb9c58f"; 74 + }; 75 + 76 + configureFlags = [ 77 + "--with-zlib-dir=${pkgs.zlib}" 78 + "--with-libmemcached-dir=${pkgs.libmemcached}" 79 + ]; 80 + 81 + buildInputs = with pkgs; [ pkgconfig cyrus_sasl ]; 82 + }; 83 + 84 + xdebug = if isPhp7 then xdebug24 else xdebug23; 85 + 86 + xdebug23 = assert !isPhp7; buildPecl { 44 87 name = "xdebug-2.3.1"; 45 88 46 89 sha256 = "0k567i6w7cw14m13s7ip0946pvy5ii16cjwjcinnviw9c24na0xm"; ··· 49 92 checkTarget = "test"; 50 93 }; 51 94 52 - zendopcache = buildPecl { 95 + xdebug24 = buildPecl { 96 + name = "xdebug-2.4.0RC3"; 97 + 98 + sha256 = "06ppsihw4cl8kxmywvic6wsm4ps9pvsns2vbab9ivrfyp8b6h5dy"; 99 + 100 + doCheck = true; 101 + checkTarget = "test"; 102 + }; 103 + 104 + # Since PHP 5.5 OPcache is integrated in the core and has to be enabled via --enable-opcache during compilation. 105 + zendopcache = assert isPhpOlder55; buildPecl { 53 106 name = "zendopcache-7.0.3"; 54 107 55 108 sha256 = "0qpfbkfy4wlnsfq4vc4q5wvaia83l89ky33s08gqrcfp3p1adn88"; 56 109 }; 57 110 58 - zmq = buildPecl { 111 + zmq = if isPhp7 then zmqPhp7 else zmq11; 112 + 113 + zmq11 = assert !isPhp7; buildPecl { 59 114 name = "zmq-1.1.2"; 60 115 61 116 sha256 = "0ccz73p8pkda3y9p9qbr3m19m0yrf7k2bvqgbaly3ibgh9bazc69"; ··· 67 122 buildInputs = [ pkgs.pkgconfig ]; 68 123 }; 69 124 70 - xcache = buildPecl rec { 125 + # Not released yet 126 + zmqPhp7 = assert isPhp7; buildPecl rec { 127 + name = "zmq-php7"; 128 + 129 + src = fetchgit { 130 + url = "https://github.com/mkoppanen/php-zmq"; 131 + rev = "94d2b87d195f870775b153b42c29f30da049f4db"; 132 + sha256 = "51a25b1029800d8abe03c5c08c50d6aee941c95c741dc22d2f853052511f4296"; 133 + }; 134 + 135 + configureFlags = [ 136 + "--with-zmq=${pkgs.zeromq2}" 137 + ]; 138 + 139 + buildInputs = [ pkgs.pkgconfig ]; 140 + }; 141 + 142 + # No support for PHP 7 and probably never will be 143 + xcache = assert !isPhp7; buildPecl rec { 71 144 name = "xcache-${version}"; 72 145 73 146 version = "3.2.0"; ··· 92 165 buildInputs = [ pkgs.m4 ]; 93 166 }; 94 167 95 - pthreads = assert pkgs.config.php.zts or false; buildPecl { 96 - #pthreads requires a build of PHP with ZTS (Zend Thread Safety) enabled 97 - #--enable-maintainer-zts or --enable-zts on Windows 168 + #pthreads requires a build of PHP with ZTS (Zend Thread Safety) enabled 169 + #--enable-maintainer-zts or --enable-zts on Windows 170 + pthreads = if isPhp7 then pthreads31 else pthreads20; 171 + 172 + pthreads20 = assert (pkgs.config.php.zts or false) && (!isPhp7); buildPecl { 98 173 name = "pthreads-2.0.10"; 99 174 sha256 = "1xlcb1b1g10jd0xhm3c01a06yqpb5qln47pd1k522138324qvpwb"; 100 175 }; 101 176 102 - geoip = buildPecl { 177 + pthreads31 = assert (pkgs.config.php.zts or false) && isPhp7; buildPecl { 178 + name = "pthreads-3.1.5"; 179 + sha256 = "1ziap0py3zrc7qj9lw4nzq6wx1viyj8v9y1babchizzan014x6p5"; 180 + }; 181 + 182 + # No support for PHP 7 yet 183 + geoip = assert !isPhp7; buildPecl { 103 184 name = "geoip-1.1.0"; 104 185 sha256 = "1fcqpsvwba84gqqmwyb5x5xhkazprwkpsnn4sv2gfbsd4svxxil2"; 105 186 ··· 108 189 buildInputs = [ pkgs.geoip ]; 109 190 }; 110 191 111 - redis = buildPecl { 192 + redis = if isPhp7 then redisPhp7 else redis22; 193 + 194 + redis22 = buildPecl { 112 195 name = "redis-2.2.7"; 113 196 sha256 = "00n9dpk9ak0bl35sbcd3msr78sijrxdlb727nhg7f2g7swf37rcm"; 197 + }; 198 + 199 + # Not released yet 200 + redisPhp7 = assert isPhp7; buildPecl rec { 201 + name = "redis-php7"; 202 + 203 + src = fetchgit { 204 + url = "https://github.com/phpredis/phpredis"; 205 + rev = "4a37e47d0256581ce2f7a3b15b5bb932add09f36"; 206 + sha256 = "ac5894d168e22ae4a770ce252cfbd07d0f9f1a5b48b084c0559b67fe4d3e51cb"; 207 + }; 114 208 }; 115 209 116 210 composer = pkgs.stdenv.mkDerivation rec {