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