diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/srtp')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/srtp/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/srtp/default.nix b/nixpkgs/pkgs/development/libraries/srtp/default.nix new file mode 100644 index 000000000000..c9073fc0b7e7 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/srtp/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, pkgconfig +, openssl ? null, libpcap ? null +}: + +with stdenv.lib; +stdenv.mkDerivation rec { + name = "libsrtp-${version}"; + version = "2.2.0"; + + src = fetchFromGitHub { + owner = "cisco"; + repo = "libsrtp"; + rev = "v${version}"; + sha256 = "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + # libsrtp.pc references -lcrypto -lpcap without -L + propagatedBuildInputs = [ openssl libpcap ]; + + configureFlags = [ + "--disable-debug" + ] ++ optional (openssl != null) "--enable-openssl"; + + buildFlags = [ "shared_library" ]; + + postInstall = '' + rm -rf $out/bin + ''; + + meta = { + homepage = https://github.com/cisco/libsrtp; + description = "Secure RTP (SRTP) Reference Implementation"; + license = licenses.bsd3; + platforms = platforms.all; + }; +} |