nixpkgs/pkgs/development/libraries/live555/default.nix
Vladimír Čunát 2e6bf42a22
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
2019-08-24 08:55:37 +02:00

63 lines
1.8 KiB
Nix

{ stdenv, fetchurl, lib, darwin }:
# Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD
stdenv.mkDerivation rec {
pname = "live555";
version = "2019.08.16";
src = fetchurl { # the upstream doesn't provide a stable URL
urls = [
"mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz"
"https://download.videolan.org/contrib/live555/live.${version}.tar.gz"
];
sha256 = "1y77dc5qxd731w96x707iibavmkfayy5s557d7lasg742h36lcqv";
};
postPatch = ''
sed 's,/bin/rm,rm,g' -i genMakefiles
sed \
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
-i config.linux
'' + stdenv.lib.optionalString (stdenv ? glibc) ''
substituteInPlace liveMedia/include/Locale.hh \
--replace '<xlocale.h>' '<locale.h>'
'';
configurePhase = ''
runHook preConfigure
./genMakefiles ${{
x86_64-darwin = "macosx";
i686-linux = "linux";
x86_64-linux = "linux-64bit";
aarch64-linux = "linux-64bit";
}.${stdenv.hostPlatform.system}}
runHook postConfigure
'';
installPhase = ''
runHook preInstall
for dir in BasicUsageEnvironment groupsock liveMedia UsageEnvironment; do
install -dm755 $out/{bin,lib,include/$dir}
install -m644 $dir/*.a "$out/lib"
install -m644 $dir/include/*.h* "$out/include/$dir"
done
runHook postInstall
'';
nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools;
enableParallelBuilding = true;
meta = with lib; {
description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)";
homepage = http://www.live555.com/liveMedia/;
license = licenses.lgpl21Plus;
platforms = platforms.unix;
broken = stdenv.hostPlatform.isAarch64;
};
}