diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-01-14 13:01:24 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-01-23 22:53:58 -0300 |
commit | 8a05729f0b84488239da0deeb8a3759f74e20e37 (patch) | |
tree | 3999fad94c8724940f7f9df05ce8c9620a75a53c /pkgs/by-name/li | |
parent | d533e493ece5b54b00f7afb7101652a07d01a26d (diff) | |
download | nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.tar nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.tar.gz nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.tar.bz2 nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.tar.lz nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.tar.xz nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.tar.zst nixlib-8a05729f0b84488239da0deeb8a3759f74e20e37.zip |
live555: migrate to by-name
Diffstat (limited to 'pkgs/by-name/li')
-rw-r--r-- | pkgs/by-name/li/live555/package.nix | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/by-name/li/live555/package.nix b/pkgs/by-name/li/live555/package.nix new file mode 100644 index 000000000000..369e9ff825f7 --- /dev/null +++ b/pkgs/by-name/li/live555/package.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, fetchurl +, darwin +, openssl + +# major and only downstream dependency +, vlc +}: + +stdenv.mkDerivation rec { + pname = "live555"; + version = "2023.05.10"; + + src = fetchurl { + urls = [ + "http://www.live555.com/liveMedia/public/live.${version}.tar.gz" + "https://download.videolan.org/contrib/live555/live.${version}.tar.gz" + "mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz" + ]; + sha256 = "sha256-6ph9x4UYELkkJVIE9r25ycc5NOYbPcgAy9LRZebvGFY="; + }; + + nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools; + + buildInputs = [ openssl ]; + + postPatch = '' + substituteInPlace config.macosx-catalina \ + --replace '/usr/lib/libssl.46.dylib' "${lib.getLib openssl}/lib/libssl.dylib" \ + --replace '/usr/lib/libcrypto.44.dylib' "${lib.getLib openssl}/lib/libcrypto.dylib" + sed -i -e 's|/bin/rm|rm|g' genMakefiles + sed -i \ + -e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \ + config.linux + '' # condition from icu/base.nix + + lib.optionalString (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") '' + substituteInPlace liveMedia/include/Locale.hh \ + --replace '<xlocale.h>' '<locale.h>' + ''; + + configurePhase = '' + runHook preConfigure + + ./genMakefiles ${ + if stdenv.isLinux then + "linux" + else if stdenv.isDarwin then + "macosx-catalina" + else + throw "Unsupported platform ${stdenv.hostPlatform.system}"} + + runHook postConfigure + ''; + + makeFlags = [ + "DESTDIR=${placeholder "out"}" + "PREFIX=" + ]; + + enableParallelBuilding = true; + + passthru.tests = { + inherit vlc; + }; + + meta = with lib; { + homepage = "http://www.live555.com/liveMedia/"; + description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)"; + changelog = "http://www.live555.com/liveMedia/public/changelog.txt"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +} |