nixpkgs/pkgs/tools/video/rtmpdump/default.nix

60 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchgit
, fetchpatch
, zlib
, gnutlsSupport ? false
, gnutls
, nettle
, opensslSupport ? true
, openssl
2015-02-17 22:15:03 +01:00
}:
assert (gnutlsSupport || opensslSupport);
2021-01-15 10:19:50 +01:00
with lib;
2019-08-31 05:43:51 +02:00
stdenv.mkDerivation {
pname = "rtmpdump";
version = "unstable-2019-03-30";
src = fetchgit {
2019-08-31 05:43:51 +02:00
url = "git://git.ffmpeg.org/rtmpdump";
2015-02-17 22:15:03 +01:00
# Currently the latest commit is used (a release has not been made since 2011, i.e. '2.4')
2019-08-31 05:43:51 +02:00
rev = "c5f04a58fc2aeea6296ca7c44ee4734c18401aa3";
sha256 = "07ias612jgmxpam9h418kvlag32da914jsnjsfyafklpnh8gdzjb";
};
2019-08-31 05:40:32 +02: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 21:30:18 +02:00
makeFlags = [
"prefix=$(out)"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
]
2015-02-17 22:15:03 +01:00
++ optional gnutlsSupport "CRYPTO=GNUTLS"
2015-04-03 02:46:09 +02:00
++ optional opensslSupport "CRYPTO=OPENSSL"
2015-04-03 19:53:54 +02:00
++ optional stdenv.isDarwin "SYS=darwin"
++ optional stdenv.cc.isClang "CC=clang";
propagatedBuildInputs = [ zlib ]
++ optionals gnutlsSupport [ gnutls nettle ]
2015-02-17 22:15:03 +01:00
++ optional opensslSupport openssl;
outputs = [ "out" "dev" ];
2019-08-31 05:43:51 +02:00
separateDebugInfo = true;
meta = {
description = "Toolkit for RTMP streams";
homepage = "https://rtmpdump.mplayerhq.hu/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ codyopel ];
};
}