2015-04-06 22:44:42 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig
|
|
|
|
, openssl ? null, libpcap ? null
|
|
|
|
}:
|
2010-09-06 00:37:54 +01:00
|
|
|
|
2015-04-06 22:44:42 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libsrtp-${version}";
|
2016-04-03 15:07:33 +01:00
|
|
|
version = "1.5.4";
|
2015-04-06 22:44:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cisco";
|
|
|
|
repo = "libsrtp";
|
|
|
|
rev = "v${version}";
|
2016-04-03 15:07:33 +01:00
|
|
|
sha256 = "0s029m4iw0nsvnsm2hlz8yajrasdvf315iv2dw8mfm7nhbshwsqa";
|
2010-09-06 00:37:54 +01:00
|
|
|
};
|
|
|
|
|
2015-04-06 22:44:42 +01:00
|
|
|
buildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
# libsrtp.pc references -lcrypto -lpcap without -L
|
|
|
|
propagatedBuildInputs = [ openssl libpcap ];
|
2010-09-06 00:37:54 +01:00
|
|
|
|
2015-04-06 22:44:42 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-debug"
|
|
|
|
] ++ optional (openssl != null) "--enable-openssl";
|
2012-09-24 18:02:19 +01:00
|
|
|
|
2017-03-22 18:49:41 +00:00
|
|
|
buildFlags = [ "shared_library" ];
|
|
|
|
|
2015-04-06 22:44:42 +01:00
|
|
|
postInstall = ''
|
2016-04-03 15:07:33 +01:00
|
|
|
rm -rf $out/bin
|
2015-04-06 22:44:42 +01:00
|
|
|
'';
|
2012-09-24 18:02:19 +01:00
|
|
|
|
2010-09-06 00:37:54 +01:00
|
|
|
meta = {
|
2015-04-06 22:44:42 +01:00
|
|
|
homepage = https://github.com/cisco/libsrtp;
|
|
|
|
description = "Secure RTP (SRTP) Reference Implementation";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
2010-09-06 00:37:54 +01:00
|
|
|
};
|
2015-04-06 22:44:42 +01:00
|
|
|
}
|