about summary refs log tree commit diff
path: root/pkgs/development/libraries/srtp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-04-06 14:44:42 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-04-06 20:12:07 -0700
commitfe4997d58de452791c5dfd95a9df5c8a22d93a11 (patch)
tree21139ef0f523aaff25fe9c66bb93dd70012e24bb /pkgs/development/libraries/srtp
parent8ad6b875abc1bbd04c1598b8d2f5ebd7053068b6 (diff)
downloadnixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.tar
nixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.tar.gz
nixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.tar.bz2
nixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.tar.lz
nixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.tar.xz
nixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.tar.zst
nixlib-fe4997d58de452791c5dfd95a9df5c8a22d93a11.zip
srtp: Remove linphone and update 1.4.4 -> 1.5.2
Diffstat (limited to 'pkgs/development/libraries/srtp')
-rw-r--r--pkgs/development/libraries/srtp/default.nix71
-rw-r--r--pkgs/development/libraries/srtp/linphone.nix15
2 files changed, 28 insertions, 58 deletions
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 ];
+
+  # libsrtp.pc references -lcrypto -lpcap without -L
+  propagatedBuildInputs = [ openssl libpcap ];
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["setVars" "doConfigure" "doMakeInstall"];
+  configureFlags = [
+    "--disable-debug"
+  ] ++ optional (openssl != null) "--enable-openssl";
 
-  setVars = a.fullDepEntry ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
-  '' ["minInit"];
+  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 ];
-}