Merge pull request #220892 from Janik-Haag/asterisk
asterisk: add sub-package with ldap support
This commit is contained in:
commit
b368988e6e
2 changed files with 73 additions and 24 deletions
|
@ -1,11 +1,38 @@
|
||||||
{ stdenv, lib, fetchurl, fetchsvn, fetchFromGitHub,
|
{ stdenv
|
||||||
jansson, libedit, libxml2, libxslt, ncurses, openssl, sqlite,
|
, lib
|
||||||
util-linux, dmidecode, libuuid, newt,
|
, fetchurl
|
||||||
lua, speex, libopus, opusfile, libogg,
|
, fetchsvn
|
||||||
srtp, wget, curl, iksemel, pkg-config,
|
, fetchFromGitHub
|
||||||
autoconf, libtool, automake, fetchpatch,
|
, jansson
|
||||||
python39, writeScript,
|
, libedit
|
||||||
withOpus ? true,
|
, libxml2
|
||||||
|
, libxslt
|
||||||
|
, ncurses
|
||||||
|
, openssl
|
||||||
|
, sqlite
|
||||||
|
, util-linux
|
||||||
|
, dmidecode
|
||||||
|
, libuuid
|
||||||
|
, newt
|
||||||
|
, lua
|
||||||
|
, speex
|
||||||
|
, libopus
|
||||||
|
, opusfile
|
||||||
|
, libogg
|
||||||
|
, srtp
|
||||||
|
, wget
|
||||||
|
, curl
|
||||||
|
, iksemel
|
||||||
|
, pkg-config
|
||||||
|
, autoconf
|
||||||
|
, libtool
|
||||||
|
, automake
|
||||||
|
, fetchpatch
|
||||||
|
, python39
|
||||||
|
, writeScript
|
||||||
|
, withOpus ? true
|
||||||
|
, ldapSupport ? false
|
||||||
|
, openldap
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -27,15 +54,32 @@ let
|
||||||
sha256 = "sha256-0iEr/Z4UQpWsTXYWVYzWWk7MQDOFnTQ1BBYpynGLTVQ=";
|
sha256 = "sha256-0iEr/Z4UQpWsTXYWVYzWWk7MQDOFnTQ1BBYpynGLTVQ=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
common = {version, sha256, externals}: stdenv.mkDerivation {
|
common = { version, sha256, externals }: stdenv.mkDerivation {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "asterisk";
|
pname = "asterisk"
|
||||||
|
+ lib.optionalString ldapSupport "-ldap";
|
||||||
|
|
||||||
buildInputs = [ jansson libedit libxml2 libxslt ncurses openssl sqlite
|
|
||||||
dmidecode libuuid newt
|
buildInputs = [
|
||||||
lua speex
|
jansson
|
||||||
srtp wget curl iksemel ]
|
libedit
|
||||||
++ lib.optionals withOpus [ libopus opusfile libogg ];
|
libxml2
|
||||||
|
libxslt
|
||||||
|
ncurses
|
||||||
|
openssl
|
||||||
|
sqlite
|
||||||
|
dmidecode
|
||||||
|
libuuid
|
||||||
|
newt
|
||||||
|
lua
|
||||||
|
speex
|
||||||
|
srtp
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
iksemel
|
||||||
|
]
|
||||||
|
++ lib.optionals withOpus [ libopus opusfile libogg ]
|
||||||
|
++ lib.optionals ldapSupport [ openldap ];
|
||||||
nativeBuildInputs = [ util-linux pkg-config autoconf libtool automake ];
|
nativeBuildInputs = [ util-linux pkg-config autoconf libtool automake ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -135,13 +179,15 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
# auto-generated by update.py
|
# auto-generated by update.py
|
||||||
versions = lib.mapAttrs (_: {version, sha256}: common {
|
versions = lib.mapAttrs
|
||||||
inherit version sha256;
|
(_: { version, sha256 }: common {
|
||||||
externals = {
|
inherit version sha256;
|
||||||
"externals_cache/pjproject-2.12.1.tar.bz2" = pjproject_2_12_1;
|
externals = {
|
||||||
"addons/mp3" = mp3-202;
|
"externals_cache/pjproject-2.12.1.tar.bz2" = pjproject_2_12_1;
|
||||||
};
|
"addons/mp3" = mp3-202;
|
||||||
}) (lib.importJSON ./versions.json);
|
};
|
||||||
|
})
|
||||||
|
(lib.importJSON ./versions.json);
|
||||||
|
|
||||||
updateScript_python = python39.withPackages (p: with p; [ packaging beautifulsoup4 requests ]);
|
updateScript_python = python39.withPackages (p: with p; [ packaging beautifulsoup4 requests ]);
|
||||||
updateScript = writeScript "asterisk-update" ''
|
updateScript = writeScript "asterisk-update" ''
|
||||||
|
@ -149,7 +195,8 @@ let
|
||||||
exec ${updateScript_python}/bin/python ${toString ./update.py}
|
exec ${updateScript_python}/bin/python ${toString ./update.py}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Supported releases (as of 2022-04-05).
|
# Supported releases (as of 2022-04-05).
|
||||||
# Source: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
|
# Source: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
|
||||||
# Exact version can be found at https://www.asterisk.org/downloads/asterisk/all-asterisk-versions/
|
# Exact version can be found at https://www.asterisk.org/downloads/asterisk/all-asterisk-versions/
|
||||||
|
@ -162,7 +209,7 @@ in {
|
||||||
asterisk-lts = versions.asterisk_18;
|
asterisk-lts = versions.asterisk_18;
|
||||||
asterisk-stable = versions.asterisk_19;
|
asterisk-stable = versions.asterisk_19;
|
||||||
asterisk = versions.asterisk_19.overrideAttrs (o: {
|
asterisk = versions.asterisk_19.overrideAttrs (o: {
|
||||||
passthru = (o.passthru or {}) // { inherit updateScript; };
|
passthru = (o.passthru or { }) // { inherit updateScript; };
|
||||||
});
|
});
|
||||||
|
|
||||||
} // versions
|
} // versions
|
||||||
|
|
|
@ -24852,6 +24852,8 @@ with pkgs;
|
||||||
|
|
||||||
asterisk-module-sccp = callPackage ../servers/asterisk/sccp { };
|
asterisk-module-sccp = callPackage ../servers/asterisk/sccp { };
|
||||||
|
|
||||||
|
asterisk-ldap = lowPrio (asterisk.override { ldapSupport = true; });
|
||||||
|
|
||||||
sabnzbd = callPackage ../servers/sabnzbd { };
|
sabnzbd = callPackage ../servers/sabnzbd { };
|
||||||
|
|
||||||
baserow = callPackage ../servers/baserow { };
|
baserow = callPackage ../servers/baserow { };
|
||||||
|
|
Loading…
Reference in a new issue