at 17.09-beta 42 lines 1.3 kB view raw
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-12-30"; 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 = "fa8646daeb19dfd12c181f7d19de708d623704c0"; 20 sha256 = "17m9rmnnqyyzsnnxcdl8258hjmw16nxbj1n1lr7fj3kmcs189iig"; 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 outputs = [ "out" "dev" ]; 34 35 meta = { 36 description = "Toolkit for RTMP streams"; 37 homepage = http://rtmpdump.mplayerhq.hu/; 38 license = licenses.gpl2; 39 platforms = platforms.unix; 40 maintainers = with maintainers; [ codyopel viric ]; 41 }; 42}