2015-02-17 22:15:03 +01:00
|
|
|
{ stdenv, fetchgit, zlib
|
2015-06-01 13:08:21 +02:00
|
|
|
, gnutlsSupport ? false, gnutls ? null, nettle ? null
|
2015-05-01 23:37:10 +02:00
|
|
|
, opensslSupport ? true, openssl ? null
|
2015-02-17 22:15:03 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
# Must have an ssl library enabled
|
|
|
|
assert (gnutlsSupport || opensslSupport);
|
2015-06-01 13:08:21 +02:00
|
|
|
assert gnutlsSupport -> gnutlsSupport != null && nettle != null && !opensslSupport;
|
|
|
|
assert opensslSupport -> openssl != null && !gnutlsSupport;
|
2015-02-17 22:15:03 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtmpdump-${version}";
|
2015-06-01 13:08:21 +02:00
|
|
|
version = "2015-01-15";
|
2010-04-30 23:46:55 +02:00
|
|
|
|
2011-09-25 11:04:24 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = git://git.ffmpeg.org/rtmpdump;
|
2015-02-17 22:15:03 +01:00
|
|
|
# Currently the latest commit is used (a release has not been made since 2011, i.e. '2.4')
|
|
|
|
rev = "a107cef9b392616dff54fabfd37f985ee2190a6f";
|
2016-06-02 13:26:44 +02:00
|
|
|
sha256 = "03x7dy111dk8b23cq2wb5h8ljcv58fzhp0xm0d1myfvzhr9amqqs";
|
2010-04-30 23:46:55 +02:00
|
|
|
};
|
|
|
|
|
2015-02-17 22:15:03 +01:00
|
|
|
makeFlags = [ ''prefix=$(out)'' ]
|
|
|
|
++ optional gnutlsSupport "CRYPTO=GNUTLS"
|
2015-04-03 02:46:09 +02:00
|
|
|
++ optional opensslSupport "CRYPTO=OPENSSL"
|
2015-04-03 19:53:54 +02:00
|
|
|
++ optional stdenv.isDarwin "SYS=darwin"
|
2015-05-11 23:37:53 +02:00
|
|
|
++ optional stdenv.cc.isClang "CC=clang";
|
2010-04-30 23:46:55 +02:00
|
|
|
|
2015-05-15 21:38:50 +02:00
|
|
|
propagatedBuildInputs = [ zlib ]
|
2015-06-01 13:08:21 +02:00
|
|
|
++ optionals gnutlsSupport [ gnutls nettle ]
|
2015-02-17 22:15:03 +01:00
|
|
|
++ optional opensslSupport openssl;
|
2010-04-30 23:46:55 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Toolkit for RTMP streams";
|
2015-02-17 22:15:03 +01:00
|
|
|
homepage = http://rtmpdump.mplayerhq.hu/;
|
|
|
|
license = licenses.gpl2;
|
2015-04-03 02:46:09 +02:00
|
|
|
platforms = platforms.unix;
|
2015-02-17 22:15:03 +01:00
|
|
|
maintainers = with maintainers; [ codyopel viric ];
|
2010-04-30 23:46:55 +02:00
|
|
|
};
|
|
|
|
}
|