php: add option to enable argon2

This commit is contained in:
aanderse 2018-09-17 13:02:16 -04:00 committed by Robin Gloster
parent 463704a62e
commit e48811f83d

View File

@ -3,7 +3,7 @@
, mysql, libxml2, readline, zlib, curl, postgresql, gettext
, openssl, pcre, pkgconfig, sqlite, config, libjpeg, libpng, freetype
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy
, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
}:
with lib;
@ -54,6 +54,7 @@ let
, calendarSupport ? config.php.calendar or true
, sodiumSupport ? (config.php.sodium or true) && (versionAtLeast version "7.2")
, tidySupport ? (config.php.tidy or false)
, argon2Support ? (config.php.argon2 or true) && (versionAtLeast version "7.2")
}:
let
@ -95,7 +96,8 @@ let
++ optional bz2Support bzip2
++ optional (mssqlSupport && !stdenv.isDarwin) freetds
++ optional sodiumSupport libsodium
++ optional tidySupport html-tidy;
++ optional tidySupport html-tidy
++ optional argon2Support libargon2;
CXXFLAGS = optional stdenv.cc.isClang "-std=c++11";
@ -160,7 +162,8 @@ let
++ optional ztsSupport "--enable-maintainer-zts"
++ optional calendarSupport "--enable-calendar"
++ optional sodiumSupport "--with-sodium=${libsodium.dev}"
++ optional tidySupport "--with-tidy=${html-tidy}";
++ optional tidySupport "--with-tidy=${html-tidy}"
++ optional argon2Support "--with-password-argon2=${libargon2}";
hardeningDisable = [ "bindnow" ];