From fe4997d58de452791c5dfd95a9df5c8a22d93a11 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Mon, 6 Apr 2015 14:44:42 -0700 Subject: [PATCH] srtp: Remove linphone and update 1.4.4 -> 1.5.2 --- pkgs/development/libraries/srtp/default.nix | 71 ++++++++------------ pkgs/development/libraries/srtp/linphone.nix | 15 ----- pkgs/top-level/all-packages.nix | 6 +- 3 files changed, 31 insertions(+), 61 deletions(-) delete mode 100644 pkgs/development/libraries/srtp/linphone.nix diff --git a/pkgs/development/libraries/srtp/default.nix b/pkgs/development/libraries/srtp/default.nix index c6cf56e59d69..98cf160e8b51 100644 --- a/pkgs/development/libraries/srtp/default.nix +++ b/pkgs/development/libraries/srtp/default.nix @@ -1,51 +1,36 @@ -x@{builderDefsPackage - , autoconf, automake, libtool, doxygen, procps - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchFromGitHub, pkgconfig +, openssl ? null, libpcap ? null +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="srtp"; - version="1.4.4"; - name="${baseName}-${version}"; - url="mirror://sourceforge/${baseName}/${name}.tgz"; - hash="057k191hx7sf84wdvc8wr1nk4whhrvbg1vv3r4nyswjir6qwphnr"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +with stdenv.lib; +stdenv.mkDerivation rec { + name = "libsrtp-${version}"; + version = "1.5.2"; + + src = fetchFromGitHub { + owner = "cisco"; + repo = "libsrtp"; + rev = "v${version}"; + sha256 = "0iy1il72gnjcwbi16wf4kzdqs1xx8is9qvs6m49pg37218s26gdw"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ pkgconfig ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["setVars" "doConfigure" "doMakeInstall"]; + # libsrtp.pc references -lcrypto -lpcap without -L + propagatedBuildInputs = [ openssl libpcap ]; - setVars = a.fullDepEntry '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC" - '' ["minInit"]; + configureFlags = [ + "--disable-debug" + ] ++ optional (openssl != null) "--enable-openssl"; + + postInstall = '' + rmdir $out/bin + ''; meta = { - description = "Secure RTP"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + homepage = https://github.com/cisco/libsrtp; + description = "Secure RTP (SRTP) Reference Implementation"; + license = licenses.bsd3; + platforms = platforms.all; }; - passthru = { - updateInfo = { - downloadPage = "http://srtp.sourceforge.net/download.html"; - }; - }; -}) x - +} diff --git a/pkgs/development/libraries/srtp/linphone.nix b/pkgs/development/libraries/srtp/linphone.nix deleted file mode 100644 index 9108be5e30c9..000000000000 --- a/pkgs/development/libraries/srtp/linphone.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ stdenv, fetchgit, automake, autoconf, libtool }: - -stdenv.mkDerivation { - name = "srtp-linphone-git-20130530-1c9bd9065"; - - src = fetchgit { - url = git://git.linphone.org/srtp.git; - rev = "1c9bd9065"; - sha256 = "0r4wbrih8bggs69fnfmzm17z1pp1zp8x9qwcckcq6wc54b16d9g3"; - }; - - preConfigure = "autoreconf -vfi"; - - buildInputs = [ automake autoconf libtool ]; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a3ba1876800..025e84636a0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7548,9 +7548,9 @@ let srm = callPackage ../tools/security/srm { }; - srtp = callPackage ../development/libraries/srtp {}; - - srtp_linphone = callPackage ../development/libraries/srtp/linphone.nix { }; + srtp = callPackage ../development/libraries/srtp { + libpcap = if stdenv.isLinux then libpcap else null; + }; stxxl = callPackage ../development/libraries/stxxl { parallel = true; };