diff options
author | Janik H <janik@aq0.de> | 2023-03-14 18:33:33 +0100 |
---|---|---|
committer | Janik H <janik@aq0.de> | 2023-03-14 18:33:33 +0100 |
commit | 1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16 (patch) | |
tree | 53141a74a1e59dec64e03b8d2c5d83ec49f16d00 | |
parent | 3266f88f3dd3bcfca231ddc6c95a5da702792756 (diff) | |
download | nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.tar nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.tar.gz nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.tar.bz2 nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.tar.lz nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.tar.xz nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.tar.zst nixpkgs-1bfefc7b43cb397a34ecce9b02dd0f6b146a5e16.zip |
asterisk: autoformat default.nix
-rw-r--r-- | pkgs/servers/asterisk/default.nix | 99 |
1 files changed, 71 insertions, 28 deletions
diff --git a/pkgs/servers/asterisk/default.nix b/pkgs/servers/asterisk/default.nix index b8e856b2416..c80c747b50c 100644 --- a/pkgs/servers/asterisk/default.nix +++ b/pkgs/servers/asterisk/default.nix @@ -1,12 +1,38 @@ -{ stdenv, lib, fetchurl, fetchsvn, fetchFromGitHub, - jansson, libedit, 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 +{ stdenv +, lib +, fetchurl +, fetchsvn +, fetchFromGitHub +, jansson +, libedit +, 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 @@ -28,18 +54,32 @@ let sha256 = "sha256-0iEr/Z4UQpWsTXYWVYzWWk7MQDOFnTQ1BBYpynGLTVQ="; }) ]; - common = {version, sha256, externals}: stdenv.mkDerivation { + common = { version, sha256, externals }: stdenv.mkDerivation { inherit version; pname = "asterisk" - + lib.optionalString ldapSupport "-ldap"; - - - buildInputs = [ jansson libedit libxml2 libxslt ncurses openssl sqlite - dmidecode libuuid newt - lua speex - srtp wget curl iksemel ] - ++ lib.optionals withOpus [ libopus opusfile libogg ] - ++ lib.optionals ldapSupport [ openldap ]; + + lib.optionalString ldapSupport "-ldap"; + + + buildInputs = [ + jansson + libedit + 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 ]; patches = [ @@ -139,13 +179,15 @@ let }; # auto-generated by update.py - versions = lib.mapAttrs (_: {version, sha256}: common { - inherit version sha256; - externals = { - "externals_cache/pjproject-2.12.1.tar.bz2" = pjproject_2_12_1; - "addons/mp3" = mp3-202; - }; - }) (lib.importJSON ./versions.json); + versions = lib.mapAttrs + (_: { version, sha256 }: common { + inherit version sha256; + externals = { + "externals_cache/pjproject-2.12.1.tar.bz2" = pjproject_2_12_1; + "addons/mp3" = mp3-202; + }; + }) + (lib.importJSON ./versions.json); updateScript_python = python39.withPackages (p: with p; [ packaging beautifulsoup4 requests ]); updateScript = writeScript "asterisk-update" '' @@ -153,7 +195,8 @@ let exec ${updateScript_python}/bin/python ${toString ./update.py} ''; -in { +in +{ # Supported releases (as of 2022-04-05). # 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/ @@ -166,7 +209,7 @@ in { asterisk-lts = versions.asterisk_18; asterisk-stable = versions.asterisk_19; asterisk = versions.asterisk_19.overrideAttrs (o: { - passthru = (o.passthru or {}) // { inherit updateScript; }; + passthru = (o.passthru or { }) // { inherit updateScript; }; }); } // versions |