2019-08-31 04:40:32 +01:00
|
|
|
{ stdenv, fetchgit, fetchpatch, zlib
|
2015-06-01 12:08:21 +01:00
|
|
|
, gnutlsSupport ? false, gnutls ? null, nettle ? null
|
2015-05-01 22:37:10 +01:00
|
|
|
, opensslSupport ? true, openssl ? null
|
2015-02-17 21:15:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# Must have an ssl library enabled
|
|
|
|
assert (gnutlsSupport || opensslSupport);
|
2015-06-01 12:08:21 +01:00
|
|
|
assert gnutlsSupport -> gnutlsSupport != null && nettle != null && !opensslSupport;
|
|
|
|
assert opensslSupport -> openssl != null && !gnutlsSupport;
|
2015-02-17 21:15:03 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2019-08-31 04:43:51 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "rtmpdump";
|
2019-08-31 04:43:51 +01:00
|
|
|
version = "2019-03-30";
|
2010-04-30 22:46:55 +01:00
|
|
|
|
2011-09-25 10:04:24 +01:00
|
|
|
src = fetchgit {
|
2019-08-31 04:43:51 +01:00
|
|
|
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')
|
2019-08-31 04:43:51 +01:00
|
|
|
rev = "c5f04a58fc2aeea6296ca7c44ee4734c18401aa3";
|
|
|
|
sha256 = "07ias612jgmxpam9h418kvlag32da914jsnjsfyafklpnh8gdzjb";
|
2010-04-30 22:46:55 +01:00
|
|
|
};
|
|
|
|
|
2019-08-31 04:40:32 +01:00
|
|
|
patches = [
|
|
|
|
# Fix build with OpenSSL 1.1
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-video/rtmpdump/files/rtmpdump-openssl-1.1.patch?id=1e7bef484f96e7647f5f0911d3c8caa48131c33b";
|
|
|
|
sha256 = "1wds98pk8qr7shkfl8k49iirxiwd972h18w84bamiqln29wv6ql1";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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"
|
2015-05-11 22:37:53 +01:00
|
|
|
++ optional stdenv.cc.isClang "CC=clang";
|
2010-04-30 22:46:55 +01:00
|
|
|
|
2015-05-15 20:38:50 +01:00
|
|
|
propagatedBuildInputs = [ zlib ]
|
2015-06-01 12:08:21 +01:00
|
|
|
++ optionals gnutlsSupport [ gnutls nettle ]
|
2015-02-17 21:15:03 +00:00
|
|
|
++ optional opensslSupport openssl;
|
2010-04-30 22:46:55 +01:00
|
|
|
|
2017-03-20 13:43:55 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2019-08-31 04:43:51 +01:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2010-04-30 22:46:55 +01:00
|
|
|
meta = {
|
|
|
|
description = "Toolkit for RTMP streams";
|
2019-08-31 04:43:51 +01:00
|
|
|
homepage = "http://rtmpdump.mplayerhq.hu/";
|
2015-02-17 21:15:03 +00:00
|
|
|
license = licenses.gpl2;
|
2015-04-03 01:46:09 +01:00
|
|
|
platforms = platforms.unix;
|
2018-07-22 20:50:19 +01:00
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2010-04-30 22:46:55 +01:00
|
|
|
};
|
|
|
|
}
|