From c61d907f812abb0f3de738cbaa4a37fc7f96cbc9 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 15 Mar 2020 11:03:15 +0100 Subject: [PATCH 1/2] phpPackages.exts.pdo_odbc: init for all versions of php --- pkgs/top-level/php-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 167ed5273966..a43e44417d90 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -2,7 +2,7 @@ , bzip2, curl, libxml2, openssl, gmp5, icu, oniguruma, libsodium, html-tidy , libzip, zlib, pcre, pcre2, libxslt, aspell, openldap, cyrus_sasl, uwimap , pam, libiconv, enchant1, libXpm, gd, libwebp, libjpeg, libpng, freetype -, libffi, freetds, postgresql, sqlite, recode, net-snmp }: +, libffi, freetds, postgresql, sqlite, recode, net-snmp, unixODBC }: let self = with self; { @@ -821,7 +821,7 @@ let # pdo_firebird (7.4, 7.3, 7.2) { name = "pdo_mysql"; configureFlags = [ "--with-pdo-mysql=mysqlnd" ]; } # pdo_oci (7.4, 7.3, 7.2) - # pdo_odbc (7.4, 7.3, 7.2) + { name = "pdo_odbc"; configureFlags = [ "--with-pdo-odbc=unixODBC,${unixODBC}" ]; } { name = "pdo_pgsql"; configureFlags = [ "--with-pdo-pgsql=${postgresql}" ]; } { name = "pdo_sqlite"; buildInputs = [ sqlite ]; configureFlags = [ "--with-pdo-sqlite=${sqlite.dev}" ]; } { name = "pgsql"; buildInputs = [ pcre' ]; configureFlags = [ "--with-pgsql=${postgresql}" ]; } From 1f5af3c60608b69bc62f9789850e8280a4d53034 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 15 Mar 2020 19:34:28 +0100 Subject: [PATCH 2/2] phpPackages.exts: Mark if extensions are zend extensions or not --- pkgs/top-level/php-packages.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index a43e44417d90..cc830fa34986 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -704,11 +704,13 @@ let # Name passed is the name of the extension and is automatically used # to add the configureFlag "--enable-${name}", which can be overriden. # - # Build inputs is used for extra deps that may be needed. + # Build inputs is used for extra deps that may be needed. And zendExtension + # will mark the extension as a zend extension or not. mkExtension = { name , configureFlags ? [ "--enable-${name}" ] , buildInputs ? [] + , zendExtension ? false , ... }: stdenv.mkDerivation { pname = "php-ext-${name}"; @@ -718,7 +720,7 @@ let enableParallelBuilding = true; nativeBuildInputs = [ php autoconf pkgconfig re2c ]; - inherit configureFlags buildInputs; + inherit configureFlags buildInputs zendExtension; preConfigure = "phpize"; @@ -811,7 +813,7 @@ let { name = "mysqli"; configureFlags = [ "--with-mysqli=mysqlnd" "--with-mysql-sock=/run/mysqld/mysqld.sock" ]; } # oci8 (7.4, 7.3, 7.2) # odbc (7.4, 7.3, 7.2) - { name = "opcache"; buildInputs = [ pcre' ]; } + { name = "opcache"; buildInputs = [ pcre' ]; zendExtension = true; } { name = "pcntl"; } { name = "pdo"; } { name = "pdo_dblib";