Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3fb22f785aed
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f4375dd320cd
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 1, 2020

  1. freeswitch: 1.8.7 -> 1.10.2

    misuzu committed Jan 1, 2020
    Copy the full SHA
    6d66795 View commit details
  2. Merge pull request #76803 from misuzu/freeswitch-1.10

    freeswitch: 1.8.7 -> 1.10.2
    ryantm authored Jan 1, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f4375dd View commit details
Showing with 28 additions and 16 deletions.
  1. +21 −16 pkgs/servers/sip/freeswitch/default.nix
  2. +7 −0 pkgs/servers/sip/freeswitch/modules.nix
37 changes: 21 additions & 16 deletions pkgs/servers/sip/freeswitch/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{ fetchurl, stdenv, lib, ncurses, curl, pkgconfig, gnutls, readline
{ fetchFromGitHub, stdenv, lib, pkgconfig, autoreconfHook
, ncurses, gnutls, readline
, openssl, perl, sqlite, libjpeg, speex, pcre
, ldns, libedit, yasm, which, lua, libopus, libsndfile, libtiff
, libctb, gsmlib
, ldns, libedit, yasm, which, libsndfile, libtiff

, modules ? null
, postgresql
, enablePostgres ? true
, curl, lua, libmysqlclient, postgresql, libopus, libctb, gsmlib

, SystemConfiguration

, modules ? null
}:

let

availableModules = import ./modules.nix { inherit curl lua libopus libctb gsmlib; };
availableModules = import ./modules.nix {
inherit curl lua libmysqlclient postgresql libopus libctb gsmlib;
};

# the default list from v1.8.7, except with applications/mod_signalwire also disabled
defaultModules = mods: with mods; [
@@ -41,6 +43,9 @@ defaultModules = mods: with mods; [
codecs.h26x
codecs.opus

databases.mariadb
databases.pgsql

dialplans.asterisk
dialplans.xml

@@ -83,35 +88,35 @@ modulesConf = let
in

stdenv.mkDerivation rec {
name = "freeswitch-1.8.7";

src = fetchurl {
url = "https://files.freeswitch.org/freeswitch-releases/${name}.tar.bz2";
sha256 = "0k52mxdfc5w9fdnz8kvfjiwnnjjhnpkirnyrfkhq7bad84m731z4";
pname = "freeswitch";
version = "1.10.2";
src = fetchFromGitHub {
owner = "signalwire";
repo = pname;
rev = "v${version}";
sha256 = "1fmrm51zgrasjbmhs0pzb1lyca3ddx0wd35shvxnkjnifi8qd1h7";
};
postPatch = ''
patchShebangs libs/libvpx/build/make/rtcd.pl
substituteInPlace libs/libvpx/build/make/configure.sh \
--replace AS=\''${AS} AS=yasm
'';

nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [
openssl ncurses gnutls readline perl libjpeg
sqlite pcre speex ldns libedit yasm which
libsndfile libtiff
]
++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules)
++ lib.optionals enablePostgres [ postgresql ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];

NIX_CFLAGS_COMPILE = "-Wno-error";

hardeningDisable = [ "format" ];

configureFlags = lib.optionals enablePostgres [ "--enable-core-pgsql-support" ];

preConfigure = ''
./bootstrap.sh
cp "${modulesConf}" modules.conf
'';

7 changes: 7 additions & 0 deletions pkgs/servers/sip/freeswitch/modules.nix
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
, gsmlib
, lua
, curl
, libmysqlclient
, postgresql
}:

let
@@ -103,6 +105,11 @@ in
theora = mk "codecs/mod_theora" [];
};

databases = {
mariadb = mk "databases/mod_mariadb" [ libmysqlclient ];
pgsql = mk "databases/mod_pgsql" [ postgresql ];
};

dialplans = {
asterisk = mk "dialplans/mod_dialplan_asterisk" [];
directory = mk "dialplans/mod_dialplan_directory" [];