@@ -4,7 +4,7 @@
44, mysql, libxml2, readline, zlib, curl, postgresql, gettext
55, openssl, pcre, pkgconfig, sqlite, config, libjpeg, libpng, freetype
66, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
7−, uwimap, pam, gmp, apacheHttpd, libiconv, systemd }:
7+, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium }:
88
99let
1010
@@ -226,6 +226,11 @@ let
226226 calendar = {
227227 configureFlags = ["--enable-calendar"];
228228 };
229+
230+ sodium = {
231+ configureFlags = ["--with-sodium=${libsodium.dev}"];
232+ buildInputs = [libsodium];
233+ };
229234 };
230235
231236 cfg = {
@@ -265,6 +270,7 @@ let
265270 mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin));
266271 ztsSupport = config.php.zts or false;
267272 calendarSupport = config.php.calendar or true;
273+ sodiumSupport = (lib.versionAtLeast version "7.2") && config.php.sodium or true;
268274 };
269275
270276 hardeningDisable = [ "bindnow" ];
@@ -346,4 +352,9 @@ in {
346352 version = "7.1.11";
347353 sha256 = "0ww5493w8w3jlks0xqlfm3v6mm53vpnv5vjy63inkj8zf3gdfikn";
348354 };
355+
356+ php72 = generic {
357+ version = "7.2.0";
358+ sha256 = "0jn642bm4ah6a5cjavpz8mzw3ddxa270fcwxkj3rg6vb4bjgmzib";
359+ };
349360}