mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
39 lines
851 B
Nix
39 lines
851 B
Nix
{ stdenv, fetchFromGitHub, pkgconfig
|
|
, openssl ? null, libpcap ? null
|
|
}:
|
|
|
|
with stdenv.lib;
|
|
stdenv.mkDerivation rec {
|
|
name = "libsrtp-${version}";
|
|
version = "1.5.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cisco";
|
|
repo = "libsrtp";
|
|
rev = "v${version}";
|
|
sha256 = "0s029m4iw0nsvnsm2hlz8yajrasdvf315iv2dw8mfm7nhbshwsqa";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
# libsrtp.pc references -lcrypto -lpcap without -L
|
|
propagatedBuildInputs = [ openssl libpcap ];
|
|
|
|
configureFlags = [
|
|
"--disable-debug"
|
|
] ++ optional (openssl != null) "--enable-openssl";
|
|
|
|
buildFlags = [ "shared_library" ];
|
|
|
|
postInstall = ''
|
|
rm -rf $out/bin
|
|
'';
|
|
|
|
meta = {
|
|
homepage = https://github.com/cisco/libsrtp;
|
|
description = "Secure RTP (SRTP) Reference Implementation";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|