diff --git a/pkgs/development/libraries/srtp/default.nix b/pkgs/development/libraries/srtp/default.nix index 8bf6c6d11d5a..0dbfef2c6394 100644 --- a/pkgs/development/libraries/srtp/default.nix +++ b/pkgs/development/libraries/srtp/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, pkg-config -, openssl, libpcap, cmake +, openssl ? null, libpcap ? null }: with lib; @@ -16,26 +16,21 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config cmake ]; + nativeBuildInputs = [ pkg-config ]; # libsrtp.pc references -lcrypto -lpcap without -L propagatedBuildInputs = [ openssl libpcap ]; - cmakeFlags = [ - "-DBUILD_SHARED_LIBS=ON" - "-DENABLE_OPENSSL=ON" - "-DBUILD_TESTING=ON" - ]; + configureFlags = [ + "--disable-debug" + ] ++ optional (openssl != null) "--enable-openssl"; + + buildFlags = [ "shared_library" ]; postInstall = '' rm -rf $out/bin ''; - doCheck = true; - preCheck = '' - export LD_PRELOAD=./libsrtp2.so - ''; - meta = { homepage = "https://github.com/cisco/libsrtp"; description = "Secure RTP (SRTP) Reference Implementation";