mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-12 07:54:50 +00:00
cdab43d496
Created new package 'kamailio' which is a SIP server, that is able to handle thousands of call setups per second. It can be used to build large platforms for VoIP and realtime communictions - presence, WebRTC, Instant messaging and other applications. Closes #169350
25 lines
691 B
Nix
25 lines
691 B
Nix
{ stdenv, kamailio }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "kamailio-bin-test";
|
|
meta.timeout = 60;
|
|
src = ./.;
|
|
|
|
dontInstall = true;
|
|
|
|
buildPhase = ''
|
|
mkdir $out
|
|
|
|
${kamailio}/bin/kamailio -v > $out/kamailio-stdout
|
|
${kamailio}/bin/kamcmd -h > $out/kamcmd-stdout
|
|
(${kamailio}/bin/kamctl help || exit 0) > $out/kamctl-stdout
|
|
'';
|
|
|
|
doCheck = true;
|
|
checkPhase = ''
|
|
grep -q "version: kamailio" $out/kamailio-stdout || (echo "ERROR: kamailio cannot be run"; exit 1)
|
|
grep -q "version: kamcmd" $out/kamcmd-stdout || (echo "ERROR: kamcmd cannot be run"; exit 1)
|
|
grep -q "add a new subscriber" $out/kamctl-stdout || (echo "ERROR: kamctl cannot be run"; exit 1)
|
|
'';
|
|
}
|