diff options
author | Tim Digel <tim.digel@active-group.de> | 2016-12-28 23:04:58 +0100 |
---|---|---|
committer | Joachim Schiele <js@lastlog.de> | 2016-12-28 23:04:58 +0100 |
commit | 81d8a457ed83a83f2cb4a0151ce0a9451f77eb20 (patch) | |
tree | 2bd66653d7dba66918bdd4e19a5c4af8fc99ab34 /pkgs/servers/asterisk | |
parent | d479639187d0b3142aa158e15f1014e928a9f90c (diff) |
Fix asterisk & asterisk: 13.6.0 -> 14.1.2 (#20788)
* fix/asterisk-module: use unix-group for asterisk-files * fix/asterisk-module: add configOption to use some default config-files * fix/asterisk-module: correction of skel copy * fix/asterisk-module: use /etc/asterisk as configDir * fix/asterisk-module: add reload; do not restart unit * asterisk: 13.6.0 -> 14.1.2 * fix/asterisk: compile with lua, pjsip, format_mp3 * fix/asterisk: fix indentation * fix/asterisk: remove broken flag
Diffstat (limited to 'pkgs/servers/asterisk')
-rw-r--r-- | pkgs/servers/asterisk/default.nix | 44 | ||||
-rw-r--r-- | pkgs/servers/asterisk/disable-download.patch | 8 | ||||
-rw-r--r-- | pkgs/servers/asterisk/runtime-vardirs.patch | 6 |
3 files changed, 35 insertions, 23 deletions
diff --git a/pkgs/servers/asterisk/default.nix b/pkgs/servers/asterisk/default.nix index ed772e7b247fe..2433750ce45f3 100644 --- a/pkgs/servers/asterisk/default.nix +++ b/pkgs/servers/asterisk/default.nix @@ -1,20 +1,25 @@ -{ stdenv, fetchurl, fetchgit, jansson, libxml2, libxslt, ncurses, openssl, sqlite, utillinux }: - +{ stdenv, pkgs, fetchurl, fetchgit, + jansson, libxml2, libxslt, ncurses, openssl, sqlite, + utillinux, dmidecode, libuuid, binutils, newt, + lua, + srtp, wget, curl, + subversionClient +}: stdenv.mkDerivation rec { name = "asterisk-${version}"; - version = "13.6.0"; + version = "14.1.2"; src = fetchurl { url = "http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-${version}.tar.gz"; - sha256 = "0nh0fnqx84as92kk9d73s0386cndd17l06y1c72jl2bdjhyba0ca"; + sha256 = "0w9s4334rwvpyxm169grmnb4k9yq0l2al73dyh4cb8769qcs0ij8"; }; # Note that these sounds are included with the release tarball. They are # provided here verbatim for the convenience of anyone wanting to build # Asterisk from other sources. coreSounds = fetchurl { - url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.4.26.tar.gz; - sha256 = "2300e3ed1d2ded6808a30a6ba71191e7784710613a5431afebbd0162eb4d5d73"; + url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.5.tar.gz; + sha256 = "01xzbg7xy0c5zg7sixjw5025pvr4z64kfzi9zvx19im0w331h4cd"; }; mohSounds = fetchurl { url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-wav-2.03.tar.gz; @@ -22,7 +27,7 @@ stdenv.mkDerivation rec { }; # TODO: Sounds for other languages could be added here - buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux ]; + buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux dmidecode libuuid binutils newt lua srtp wget curl subversionClient ]; patches = [ # Disable downloading of sound files (we will fetch them @@ -38,14 +43,24 @@ stdenv.mkDerivation rec { # Use the following preConfigure section when building Asterisk from sources # other than the release tarball. -# preConfigure = '' -# ln -s ${coreSounds} sounds/asterisk-core-sounds-en-gsm-1.4.26.tar.gz -# ln -s ${mohSounds} sounds/asterisk-moh-opsound-wav-2.03.tar.gz -# ''; + # preConfigure = '' + # ln -s ${coreSounds} sounds/asterisk-core-sounds-en-gsm-1.5.tar.gz + # ln -s ${mohSounds} sounds/asterisk-moh-opsound-wav-2.03.tar.gz + #''; # The default libdir is $PREFIX/usr/lib, which causes problems when paths # compiled into Asterisk expect ${out}/usr/lib rather than ${out}/lib. - configureFlags = "--libdir=\${out}/lib"; + configureFlags = [ + "--libdir=\${out}/lib" + "--with-lua=${lua}/lib" + "--with-pjproject-bundled" + ]; + + preBuild = '' + make menuselect.makeopts + substituteInPlace menuselect.makeopts --replace 'format_mp3 ' "" + ./contrib/scripts/get_mp3_source.sh + ''; postInstall = '' # Install sample configuration files for this version of Asterisk @@ -56,9 +71,6 @@ stdenv.mkDerivation rec { description = "Software implementation of a telephone private branch exchange (PBX)"; homepage = http://www.asterisk.org/; license = licenses.gpl2; - maintainers = with maintainers; [ auntie ]; - # Marked as broken due to needing an update for security issues. - # See: https://github.com/NixOS/nixpkgs/issues/18856 - broken = true; + maintainers = with maintainers; [ auntie DerTim1 ]; }; } diff --git a/pkgs/servers/asterisk/disable-download.patch b/pkgs/servers/asterisk/disable-download.patch index 8b15ecdfaaa32..670886bfe3cc4 100644 --- a/pkgs/servers/asterisk/disable-download.patch +++ b/pkgs/servers/asterisk/disable-download.patch @@ -1,7 +1,7 @@ -diff -ruN asterisk-13.2.0/sounds/Makefile asterisk-13.2.0-patched/sounds/Makefile ---- asterisk-13.2.0/sounds/Makefile 2014-09-09 14:01:11.000000000 -0600 -+++ asterisk-13.2.0-patched/sounds/Makefile 2015-03-31 16:12:00.549133670 -0600 -@@ -89,7 +89,7 @@ +diff -ruN asterisk-14.1.2/sounds/Makefile asterisk-14.1.2-patched/sounds/Makefile +--- asterisk-14.1.2/sounds/Makefile 2016-11-10 20:43:02.000000000 +0100 ++++ asterisk-14.1.2-patched/sounds/Makefile 2016-11-16 10:08:46.591615147 +0100 +@@ -90,7 +90,7 @@ ) && touch "$(1)$(if $(3),/$(3),)/$$@"; \ fi diff --git a/pkgs/servers/asterisk/runtime-vardirs.patch b/pkgs/servers/asterisk/runtime-vardirs.patch index dfc00186d1369..17959bac9a079 100644 --- a/pkgs/servers/asterisk/runtime-vardirs.patch +++ b/pkgs/servers/asterisk/runtime-vardirs.patch @@ -1,6 +1,6 @@ -diff -rupN asterisk-13.3.2/build_tools/make_defaults_h asterisk-13.3.2-patched/build_tools/make_defaults_h ---- asterisk-13.3.2/build_tools/make_defaults_h 2012-01-30 14:21:16.000000000 -0700 -+++ asterisk-13.3.2-patched/build_tools/make_defaults_h 2015-04-15 19:07:46.760351155 -0600 +diff -rupN asterisk-14.1.2/build_tools/make_defaults_h asterisk-14.1.2-patched/build_tools/make_defaults_h +--- asterisk-14.1.2/build_tools/make_defaults_h 2016-11-10 20:43:02.000000000 +0100 ++++ asterisk-14.1.2-patched/build_tools/make_defaults_h 2016-11-16 10:09:04.189625495 +0100 @@ -1,4 +1,13 @@ #!/bin/sh + |