2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchgit
|
|
|
|
, fetchpatch
|
|
|
|
, zlib
|
|
|
|
, gnutlsSupport ? false
|
|
|
|
, gnutls
|
|
|
|
, nettle
|
|
|
|
, opensslSupport ? true
|
|
|
|
, openssl
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert (gnutlsSupport || opensslSupport);
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "rtmpdump";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "unstable-2019-03-30";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 = "c5f04a58fc2aeea6296ca7c44ee4734c18401aa3";
|
|
|
|
sha256 = "07ias612jgmxpam9h418kvlag32da914jsnjsfyafklpnh8gdzjb";
|
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
makeFlags = [
|
|
|
|
"prefix=$(out)"
|
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
|
|
]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ 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;
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
separateDebugInfo = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Toolkit for RTMP streams";
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://rtmpdump.mplayerhq.hu/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
};
|
|
|
|
}
|