11 stdenv.mkDerivation (finalAttrs: {
13 version = "2024.09.20";
17 "http://www.live555.com/liveMedia/public/live.${finalAttrs.version}.tar.gz"
18 "https://src.rrz.uni-hamburg.de/files/src/live555/live.${finalAttrs.version}.tar.gz"
19 "https://download.videolan.org/contrib/live555/live.${finalAttrs.version}.tar.gz"
20 "mirror://sourceforge/slackbuildsdirectlinks/live.${finalAttrs.version}.tar.gz"
22 hash = "sha256-TrUneCGaJJxC+GgL1ZZ/ZcONeqDH05Bp44/3lkCs9tg=";
27 name = "0000-cflags-when-darwin.patch";
28 url = "https://github.com/rgaufman/live555/commit/16701af5486bb3a2d25a28edaab07789c8a9ce57.patch?full_index=1";
29 hash = "sha256-IDSdByBu/EBLsUTBe538rWsDwH61RJfAEhvT68Nb9rU=";
33 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
42 "PREFIX=${placeholder "out"}"
44 "CPLUSPLUS_COMPILER=$(CXX)"
45 "LIBRARY_LINK=$(AR) cr "
49 # Since NIX_CFLAGS_COMPILE affects both C and C++ toolchains, we set CXXFLAGS
51 env.CXXFLAGS = "-std=c++20";
55 enableParallelBuilding = true;
57 # required for whitespaces in makeFlags
58 __structuredAttrs = true;
62 substituteInPlace config.macosx-catalina \
63 --replace '/usr/lib/libssl.46.dylib' "${lib.getLib openssl}/lib/libssl.dylib" \
64 --replace '/usr/lib/libcrypto.44.dylib' "${lib.getLib openssl}/lib/libcrypto.dylib"
65 sed -i -e 's|/bin/rm|rm|g' genMakefiles
67 -e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
70 # condition from icu/base.nix
73 (lib.elem stdenv.hostPlatform.libc [
78 substituteInPlace liveMedia/include/Locale.hh \
79 --replace '<xlocale.h>' '<locale.h>'
85 if stdenv.hostPlatform.isLinux then
87 else if stdenv.hostPlatform.isDarwin then
90 throw "Unsupported platform: ${stdenv.hostPlatform.system}";
95 ./genMakefiles ${platform}
101 # Downstream dependency
106 homepage = "http://www.live555.com/liveMedia/";
107 description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)";
108 changelog = "http://www.live555.com/liveMedia/public/changelog.txt";
109 license = with lib.licenses; [ lgpl21Plus ];
110 maintainers = with lib.maintainers; [ AndersonTorres ];
111 platforms = lib.platforms.unix;