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