1{ stdenv, fetchgit, zlib
2, gnutlsSupport ? false, gnutls ? null, nettle ? null
3, opensslSupport ? true, openssl ? null
4}:
5
6# Must have an ssl library enabled
7assert (gnutlsSupport || opensslSupport);
8assert gnutlsSupport -> gnutlsSupport != null && nettle != null && !opensslSupport;
9assert opensslSupport -> openssl != null && !gnutlsSupport;
10
11with stdenv.lib;
12stdenv.mkDerivation rec {
13 name = "rtmpdump-${version}";
14 version = "2015-01-15";
15
16 src = fetchgit {
17 url = git://git.ffmpeg.org/rtmpdump;
18 # Currently the latest commit is used (a release has not been made since 2011, i.e. '2.4')
19 rev = "a107cef9b392616dff54fabfd37f985ee2190a6f";
20 sha256 = "178h5j7w20g2h9mn6cb7dfr3fa4g4850hpl1lzxmi0nk3blzcsvl";
21 };
22
23 makeFlags = [ ''prefix=$(out)'' ]
24 ++ optional gnutlsSupport "CRYPTO=GNUTLS"
25 ++ optional opensslSupport "CRYPTO=OPENSSL"
26 ++ optional stdenv.isDarwin "SYS=darwin"
27 ++ optional stdenv.cc.isClang "CC=clang";
28
29 propagatedBuildInputs = [ zlib ]
30 ++ optionals gnutlsSupport [ gnutls nettle ]
31 ++ optional opensslSupport openssl;
32
33 meta = {
34 description = "Toolkit for RTMP streams";
35 homepage = http://rtmpdump.mplayerhq.hu/;
36 license = licenses.gpl2;
37 platforms = platforms.unix;
38 maintainers = with maintainers; [ codyopel viric ];
39 };
40}