2022-01-27 00:19:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, darwin
|
|
|
|
, openssl
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# major and only downstream dependency
|
|
|
|
, vlc
|
2022-01-27 00:19:43 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "live555";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2023.01.19";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
src = fetchurl {
|
2020-04-24 23:36:52 +00:00
|
|
|
urls = [
|
2022-01-27 00:19:43 +00:00
|
|
|
"http://www.live555.com/liveMedia/public/live.${version}.tar.gz"
|
2020-04-24 23:36:52 +00:00
|
|
|
"https://download.videolan.org/contrib/live555/live.${version}.tar.gz"
|
2022-01-27 00:19:43 +00:00
|
|
|
"mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-p8ZJE/f3AHxf3CnqgR48p4HyYicbPkKv3UvBBB2G+pk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools;
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2022-01-27 00:19:43 +00:00
|
|
|
substituteInPlace config.macosx-catalina \
|
2022-04-03 18:54:34 +00:00
|
|
|
--replace '/usr/lib/libssl.46.dylib' "${lib.getLib openssl}/lib/libssl.dylib" \
|
|
|
|
--replace '/usr/lib/libcrypto.44.dylib' "${lib.getLib openssl}/lib/libcrypto.dylib"
|
2022-01-27 00:19:43 +00:00
|
|
|
sed -i -e 's|/bin/rm|rm|g' genMakefiles
|
|
|
|
sed -i \
|
2020-04-24 23:36:52 +00:00
|
|
|
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
|
2022-01-27 00:19:43 +00:00
|
|
|
config.linux
|
2022-06-16 17:23:12 +00:00
|
|
|
'' # condition from icu/base.nix
|
|
|
|
+ lib.optionalString (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace liveMedia/include/Locale.hh \
|
|
|
|
--replace '<xlocale.h>' '<locale.h>'
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
./genMakefiles ${
|
|
|
|
if stdenv.isLinux then
|
|
|
|
"linux"
|
|
|
|
else if stdenv.isDarwin then
|
|
|
|
"macosx-catalina"
|
|
|
|
else
|
|
|
|
throw "Unsupported platform ${stdenv.hostPlatform.system}"}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postConfigure
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
"PREFIX="
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit vlc;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.live555.com/liveMedia/";
|
2022-01-27 00:19:43 +00:00
|
|
|
description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)";
|
2020-04-24 23:36:52 +00:00
|
|
|
changelog = "http://www.live555.com/liveMedia/public/changelog.txt";
|
|
|
|
license = licenses.lgpl21Plus;
|
2022-01-27 00:19:43 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|