1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 19:26:02 +00:00
nixpkgs/pkgs/tools/video/rtmpdump/default.nix

41 lines
1.3 KiB
Nix

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