about summary refs log tree commit diff
path: root/pkgs/servers/asterisk/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/asterisk/default.nix')
-rw-r--r--pkgs/servers/asterisk/default.nix44
1 files changed, 28 insertions, 16 deletions
diff --git a/pkgs/servers/asterisk/default.nix b/pkgs/servers/asterisk/default.nix
index ed772e7b247f..2433750ce45f 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 ];
   };
 }