diff --git a/pkgs/servers/sip/freeswitch/default.nix b/pkgs/servers/sip/freeswitch/default.nix index a55d1cf14cda..5f066adccccd 100644 --- a/pkgs/servers/sip/freeswitch/default.nix +++ b/pkgs/servers/sip/freeswitch/default.nix @@ -1,5 +1,19 @@ +{ fetchurl, stdenv, lib, ncurses, curl, pkgconfig, gnutls, readline +, openssl, perl, sqlite, libjpeg, speex, pcre +, ldns, libedit, yasm, which, lua, libopus, libsndfile, libtiff +, libctb, gsmlib + +, modules ? null +, postgresql +, enablePostgres ? true + +, SystemConfiguration +}: + let +availableModules = import ./modules.nix { inherit curl lua libopus libctb gsmlib; }; + # the default list from v1.8.7, except with applications/mod_signalwire also disabled defaultModules = mods: with mods; [ applications.commands @@ -57,26 +71,9 @@ defaultModules = mods: with mods; [ xml_int.cdr xml_int.rpc xml_int.scgi -]; +] ++ lib.optionals stdenv.isLinux [ endpoints.gsmopen ]; -in - -{ fetchurl, stdenv, lib, ncurses, curl, pkgconfig, gnutls, readline -, openssl, perl, sqlite, libjpeg, speex, pcre -, ldns, libedit, yasm, which, lua, libopus, libsndfile, libtiff - -, modules ? defaultModules -, postgresql -, enablePostgres ? true - -, SystemConfiguration -}: - -let - -availableModules = import ./modules.nix { inherit curl lua libopus; }; - -enabledModules = modules availableModules; +enabledModules = (if modules != null then modules else defaultModules) availableModules; modulesConf = let lst = builtins.map (mod: mod.path) enabledModules; @@ -127,7 +124,7 @@ stdenv.mkDerivation rec { description = "Cross-Platform Scalable FREE Multi-Protocol Soft Switch"; homepage = https://freeswitch.org/; license = stdenv.lib.licenses.mpl11; - maintainers = with stdenv.lib.maintainers; [ ]; + maintainers = with stdenv.lib.maintainers; [ misuzu ]; platforms = with stdenv.lib.platforms; unix; }; } diff --git a/pkgs/servers/sip/freeswitch/modules.nix b/pkgs/servers/sip/freeswitch/modules.nix index aed30e467e8b..2d8f541a3c29 100644 --- a/pkgs/servers/sip/freeswitch/modules.nix +++ b/pkgs/servers/sip/freeswitch/modules.nix @@ -1,4 +1,6 @@ { libopus +, libctb +, gsmlib , lua , curl }: @@ -114,7 +116,7 @@ in endpoints = { alsa = mk "endpoints/mod_alsa" []; dingaling = mk "endpoints/mod_dingaling" []; - gsmopen = mk "endpoints/mod_gsmopen" []; + gsmopen = mk "endpoints/mod_gsmopen" [ gsmlib libctb ]; h323 = mk "endpoints/mod_h323" []; khomp = mk "endpoints/mod_khomp" []; loopback = mk "endpoints/mod_loopback" [];