summary refs log tree commit diff
path: root/pkgs/servers/asterisk
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2020-08-21 22:01:27 +0200
committerJanne Heß <janne@hess.ooo>2020-08-21 22:14:32 +0200
commita059f0785e250d05f09a12d5a172a0bab2fe9d54 (patch)
tree2fc75567c8f00c5e97970e5f71926e9695471485 /pkgs/servers/asterisk
parentcf7a15a482174f80cdb69a6e365344be5889d94d (diff)
downloadnixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.tar
nixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.tar.gz
nixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.tar.bz2
nixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.tar.lz
nixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.tar.xz
nixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.tar.zst
nixpkgs-a059f0785e250d05f09a12d5a172a0bab2fe9d54.zip
asterisk-module-sccp: Init at 4.3.2-epsilon
Diffstat (limited to 'pkgs/servers/asterisk')
-rw-r--r--pkgs/servers/asterisk/sccp/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/asterisk/sccp/default.nix b/pkgs/servers/asterisk/sccp/default.nix
new file mode 100644
index 00000000000..827b26255cf
--- /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 ];
+  };
+}