mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
I do not have the time or energy to handle all of this. Let alone my GitHub notifications. This PR is in good faith and does not refer to anything community-related. I will keep on doing nixpkgs work but the pile of shame (let's call it that) needs to be cleaned. Thanks to @mweinelt which whom I had a discussion and who made me aware of this issue.
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
binutils-unwrapped,
|
|
patchelf,
|
|
asterisk,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "asterisk-module-sccp";
|
|
version = "4.3.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "chan-sccp";
|
|
repo = "chan-sccp";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-Lonsh7rx3C17LU5pZpZuFxlki0iotDt+FivggFJbldU=";
|
|
};
|
|
|
|
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:${lib.makeLibraryPath [ binutils-unwrapped ]}" "$p"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Replacement for the SCCP channel driver in Asterisk";
|
|
homepage = "https://github.com/chan-sccp/chan-sccp";
|
|
license = lib.licenses.gpl1Only;
|
|
maintainers = [ ];
|
|
# https://github.com/chan-sccp/chan-sccp/issues/609
|
|
broken = lib.versionAtLeast (lib.getVersion asterisk) "21";
|
|
};
|
|
})
|