From a059f0785e250d05f09a12d5a172a0bab2fe9d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Fri, 21 Aug 2020 22:01:27 +0200 Subject: [PATCH] asterisk-module-sccp: Init at 4.3.2-epsilon --- pkgs/servers/asterisk/sccp/default.nix | 34 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/servers/asterisk/sccp/default.nix diff --git a/pkgs/servers/asterisk/sccp/default.nix b/pkgs/servers/asterisk/sccp/default.nix new file mode 100644 index 000000000000..827b26255cf0 --- /dev/null +++ b/pkgs/servers/asterisk/sccp/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, binutils-unwrapped, patchelf, asterisk }: +stdenv.mkDerivation rec { + pname = "asterisk-module-sccp"; + version = "4.3.2-epsilon"; + + src = fetchFromGitHub { + owner = "chan-sccp"; + repo = "chan-sccp"; + rev = "v${version}"; + sha256 = "0sp74xvb35m32flsrib0983yn1dyz3qk69vp0gqbx620ycbz19gd"; + }; + + nativeBuildInputs = [ patchelf ]; + + configureFlags = [ "--with-asterisk=${asterisk}" ]; + + installFlags = [ "DESTDIR=/build/dest" "DATAROOTDIR=/build/dest" ]; + + postInstall = '' + mkdir -p "$out" + cp -r /build/dest/${asterisk}/* "$out" + ''; + + postFixup = '' + p="$out/lib/asterisk/modules/chan_sccp.so" + patchelf --set-rpath "$p:${stdenv.lib.makeLibraryPath [ binutils-unwrapped ]}" "$p" + ''; + + meta = with stdenv.lib; { + description = "Replacement for the SCCP channel driver in Asterisk"; + license = licenses.gpl1Only; + maintainers = with maintainers; [ das_j ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53d78398a6c2..ef26c4647824 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16040,6 +16040,8 @@ in asterisk asterisk-stable asterisk-lts asterisk_13 asterisk_15 asterisk_16; + asterisk-module-sccp = callPackage ../servers/asterisk/sccp { }; + sabnzbd = callPackage ../servers/sabnzbd { }; bftpd = callPackage ../servers/ftp/bftpd {};