1 { lib, stdenv, fetchFromGitHub, binutils-unwrapped, patchelf, asterisk }:
2 stdenv.mkDerivation rec {
3 pname = "asterisk-module-sccp";
6 src = fetchFromGitHub {
10 sha256 = "sha256-Lonsh7rx3C17LU5pZpZuFxlki0iotDt+FivggFJbldU=";
13 nativeBuildInputs = [ patchelf ];
15 configureFlags = [ "--with-asterisk=${asterisk}" ];
17 installFlags = [ "DESTDIR=/build/dest" "DATAROOTDIR=/build/dest" ];
21 cp -r /build/dest/${asterisk}/* "$out"
25 p="$out/lib/asterisk/modules/chan_sccp.so"
26 patchelf --set-rpath "$p:${lib.makeLibraryPath [ binutils-unwrapped ]}" "$p"
30 description = "Replacement for the SCCP channel driver in Asterisk";
31 license = licenses.gpl1Only;
32 maintainers = with maintainers; [ das_j ];