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