@@ -1,7 +1,10 @@
1−{ fetchurl, stdenv, ncurses, curl, pkgconfig, gnutls, readline
1+{ fetchurl, stdenv, lib, ncurses, curl, pkgconfig, gnutls, readline
22, openssl, perl, sqlite, libjpeg, speex, pcre
33, ldns, libedit, yasm, which, lua, libopus, libsndfile
44
5+, postgresql
6+, enablePostgres ? true
7+
58, SystemConfiguration
69}:
710
@@ -23,12 +26,16 @@ stdenv.mkDerivation rec {
2326 openssl ncurses curl gnutls readline perl libjpeg
2427 sqlite pcre speex ldns libedit yasm which lua libopus
2528 libsndfile
26− ] ++ stdenv.lib.optionals stdenv.isDarwin [ SystemConfiguration ];
29+ ]
30+ ++ lib.optionals enablePostgres [ postgresql ]
31+ ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
2732
2833 NIX_CFLAGS_COMPILE = "-Wno-error";
2934
3035 hardeningDisable = [ "format" ];
3136
37+ configureFlags = lib.optionals enablePostgres [ "--enable-core-pgsql-support" ];
38+
3239 meta = {
3340 description = "Cross-Platform Scalable FREE Multi-Protocol Soft Switch";
3441 homepage = https://freeswitch.org/;