1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00

srtp: 2.3.0 -> 2.4.0, switch to meson

Fix cross-compilation & enable tests
This commit is contained in:
Ryan Burns 2021-08-27 18:43:11 -07:00
parent ac0b44b1ee
commit 81eb974a2b
2 changed files with 35 additions and 20 deletions

View file

@ -1,40 +1,57 @@
{ lib, stdenv, fetchFromGitHub, pkg-config
, openssl ? null, libpcap ? null
{ lib
, stdenv
, fetchFromGitHub
, libpcap
, meson
, ninja
, openssl
, pkg-config
}:
with lib;
stdenv.mkDerivation rec {
pname = "libsrtp";
version = "2.3.0";
version = "2.4.0";
src = fetchFromGitHub {
owner = "cisco";
repo = "libsrtp";
rev = "v${version}";
sha256 = "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd";
sha256 = "0syl2ywddgqz29h43d6rc7waf3hp2yc14yhnrvdsja2bg8wrv6sb";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
# libsrtp.pc references -lcrypto -lpcap without -L
propagatedBuildInputs = [ openssl libpcap ];
buildInputs = [
libpcap
openssl
];
configureFlags = [
"--disable-debug"
] ++ optional (openssl != null) "--enable-openssl";
buildFlags = [ "shared_library" ];
postInstall = ''
rm -rf $out/bin
# rtpw tests hang
preConfigure = ''
rm test/rtpw_test.sh \
test/rtpw_test_gcm.sh
'';
meta = {
mesonFlags = [
"-Dcrypto-library=openssl"
"-Dcrypto-library-kdf=disabled"
"-Ddoc=disabled"
"-Dtests=${if doCheck then "enabled" else "disabled"}"
];
doCheck = true;
meta = with lib; {
homepage = "https://github.com/cisco/libsrtp";
description = "Secure RTP (SRTP) Reference Implementation";
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ r-burns ];
};
}

View file

@ -18795,9 +18795,7 @@ with pkgs;
srt = callPackage ../development/libraries/srt { };
srtp = callPackage ../development/libraries/srtp {
libpcap = if stdenv.isLinux then libpcap else null;
};
srtp = callPackage ../development/libraries/srtp { };
stb = callPackage ../development/libraries/stb { };