nixpkgs/pkgs/development/libraries/srtp/default.nix

41 lines
873 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, pkg-config
, openssl ? null, libpcap ? null
}:
with lib;
stdenv.mkDerivation rec {
pname = "libsrtp";
2020-01-06 22:36:17 +00:00
version = "2.3.0";
src = fetchFromGitHub {
owner = "cisco";
repo = "libsrtp";
rev = "v${version}";
2020-01-06 22:36:17 +00:00
sha256 = "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config ];
# libsrtp.pc references -lcrypto -lpcap without -L
propagatedBuildInputs = [ openssl libpcap ];
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" ];
postInstall = ''
rm -rf $out/bin
'';
2012-09-24 18:02:19 +01:00
meta = {
homepage = "https://github.com/cisco/libsrtp";
description = "Secure RTP (SRTP) Reference Implementation";
license = licenses.bsd3;
platforms = platforms.all;
};
}