nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix
K900 91558c86de roc-toolkit: propagate buildInputs
Required by the pkg-config file for libroc.
2023-01-12 16:19:08 +03:00

71 lines
1.5 KiB
Nix

{ stdenv,
lib,
fetchFromGitHub,
scons,
ragel,
gengetopt,
pkg-config,
libuv,
openfecSupport ? true,
openfec,
speexdsp,
libunwindSupport ? true,
libunwind,
pulseaudioSupport ? true,
libpulseaudio
}:
stdenv.mkDerivation rec {
pname = "roc-toolkit";
version = "0.2.1";
src = fetchFromGitHub {
owner = "roc-streaming";
repo = "roc-toolkit";
rev = "v${version}";
sha256 = "sha256-W8PiI5W1T6pNaYzR4u6fPtkP8DKq/Z85Kq/WF5dXVxo=";
};
nativeBuildInputs = [
scons
ragel
gengetopt
pkg-config
];
propagatedBuildInputs = [
libuv
libunwind
openfec
libpulseaudio
speexdsp
];
sconsFlags =
[ "--build=${stdenv.buildPlatform.config}"
"--host=${stdenv.hostPlatform.config}"
"--prefix=${placeholder "out"}"
"--disable-sox" ] ++
lib.optional (!libunwindSupport) "--disable-libunwind" ++
lib.optional (!pulseaudioSupport) "--disable-pulseaudio" ++
(if (!openfecSupport)
then ["--disable-openfec"]
else [ "--with-libraries=${openfec}/lib"
"--with-openfec-includes=${openfec.dev}/include" ]);
prePatch = lib.optionalString stdenv.isAarch64
"sed -i 's/c++98/c++11/g' SConstruct";
patches = [
./fix-pkgconfig-installation.patch
];
meta = with lib; {
description = "Roc is a toolkit for real-time audio streaming over the network";
homepage = "https://github.com/roc-streaming/roc-toolkit";
license = licenses.mpl20;
maintainers = with maintainers; [ bgamari ];
platforms = platforms.unix;
};
}