2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config
|
2015-04-06 21:44:42 +00:00
|
|
|
, openssl ? null, libpcap ? null
|
|
|
|
}:
|
2010-09-05 23:37:54 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
with lib;
|
2015-04-06 21:44:42 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libsrtp";
|
2020-01-06 22:36:17 +00:00
|
|
|
version = "2.3.0";
|
2015-04-06 21:44:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cisco";
|
|
|
|
repo = "libsrtp";
|
|
|
|
rev = "v${version}";
|
2020-01-06 22:36:17 +00:00
|
|
|
sha256 = "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd";
|
2010-09-05 23:37:54 +00:00
|
|
|
};
|
|
|
|
|
2019-09-25 15:58:30 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2015-04-06 21:44:42 +00:00
|
|
|
|
|
|
|
# libsrtp.pc references -lcrypto -lpcap without -L
|
|
|
|
propagatedBuildInputs = [ openssl libpcap ];
|
2010-09-05 23:37:54 +00:00
|
|
|
|
2015-04-06 21:44:42 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-debug"
|
|
|
|
] ++ optional (openssl != null) "--enable-openssl";
|
2012-09-24 17:02:19 +00:00
|
|
|
|
2017-03-22 18:49:41 +00:00
|
|
|
buildFlags = [ "shared_library" ];
|
|
|
|
|
2015-04-06 21:44:42 +00:00
|
|
|
postInstall = ''
|
2016-04-03 14:07:33 +00:00
|
|
|
rm -rf $out/bin
|
2015-04-06 21:44:42 +00:00
|
|
|
'';
|
2012-09-24 17:02:19 +00:00
|
|
|
|
2010-09-05 23:37:54 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/cisco/libsrtp";
|
2015-04-06 21:44:42 +00:00
|
|
|
description = "Secure RTP (SRTP) Reference Implementation";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
2010-09-05 23:37:54 +00:00
|
|
|
};
|
2015-04-06 21:44:42 +00:00
|
|
|
}
|