2021-07-17 20:42:54 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchgit
|
|
|
|
, fetchpatch
|
|
|
|
, zlib
|
|
|
|
, gnutlsSupport ? false
|
|
|
|
, gnutls
|
|
|
|
, nettle
|
|
|
|
, opensslSupport ? true
|
|
|
|
, openssl
|
2015-02-17 21:15:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert (gnutlsSupport || opensslSupport);
|
|
|
|
|
2019-08-31 03:43:51 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "rtmpdump";
|
2022-06-20 20:24:13 +00:00
|
|
|
version = "unstable-2021-02-19";
|
2010-04-30 21:46:55 +00:00
|
|
|
|
2011-09-25 09:04:24 +00:00
|
|
|
src = fetchgit {
|
2019-08-31 03:43:51 +00: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')
|
2022-06-20 20:24:13 +00:00
|
|
|
rev = "f1b83c10d8beb43fcc70a6e88cf4325499f25857";
|
|
|
|
sha256 = "0vchr0f0d5fi0zaa16jywva5db3x9dyws7clqaq32gwh5drbkvs0";
|
2010-04-30 21:46:55 +00:00
|
|
|
};
|
|
|
|
|
2019-08-31 03:40:32 +00: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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-07-17 19:30:18 +00:00
|
|
|
makeFlags = [
|
|
|
|
"prefix=$(out)"
|
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
|
|
]
|
2023-01-24 16:35:54 +00:00
|
|
|
++ lib.optional gnutlsSupport "CRYPTO=GNUTLS"
|
|
|
|
++ lib.optional opensslSupport "CRYPTO=OPENSSL"
|
|
|
|
++ lib.optional stdenv.isDarwin "SYS=darwin"
|
|
|
|
++ lib.optional stdenv.cc.isClang "CC=clang";
|
2010-04-30 21:46:55 +00:00
|
|
|
|
2015-05-15 19:38:50 +00:00
|
|
|
propagatedBuildInputs = [ zlib ]
|
2023-01-24 16:35:54 +00:00
|
|
|
++ lib.optionals gnutlsSupport [ gnutls nettle ]
|
|
|
|
++ lib.optional opensslSupport openssl;
|
2010-04-30 21:46:55 +00:00
|
|
|
|
2017-03-20 13:43:55 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2019-08-31 03:43:51 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2023-01-24 16:35:54 +00:00
|
|
|
meta = with lib; {
|
2010-04-30 21:46:55 +00:00
|
|
|
description = "Toolkit for RTMP streams";
|
2021-07-17 20:42:54 +00:00
|
|
|
homepage = "https://rtmpdump.mplayerhq.hu/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
2018-07-22 19:50:19 +00:00
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2010-04-30 21:46:55 +00:00
|
|
|
};
|
|
|
|
}
|