nixfiles/overlay/roc-toolkit-patched/default.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

{
stdenv,
lib,
fetchFromGitHub,
sconsPackages,
ragel,
gengetopt,
pkg-config,
libuv,
openfecSupport ? true,
openfec,
libunwindSupport ? true,
libunwind,
pulseaudioSupport ? true,
libpulseaudio,
soxSupport ? true,
sox,
}:
2022-01-26 23:05:24 +00:00
stdenv.mkDerivation rec {
pname = "roc-toolkit";
version = "0.1.5";
src = fetchFromGitHub {
owner = "roc-streaming";
repo = "roc-toolkit";
rev = "v${version}";
sha256 = "sha256:1pld340zfch4p3qaf5anrspq7vmxrgf9ddsdsq92pk49axaaz19w";
};
nativeBuildInputs = [sconsPackages.scons_3_0_1 ragel gengetopt pkg-config];
2022-01-26 23:05:24 +00:00
buildInputs = [libuv libunwind openfec libpulseaudio sox];
2022-01-26 23:05:24 +00:00
sconsFlags =
[
"--build=${stdenv.buildPlatform.config}"
"--host=${stdenv.hostPlatform.config}"
"--prefix=${placeholder "out"}"
"--disable-tests"
]
++ lib.optional (!soxSupport) "--disable-sox"
2022-01-29 18:06:26 +00:00
++ 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"
]
);
2022-01-26 23:05:24 +00:00
2022-01-29 18:06:26 +00:00
prePatch =
lib.optionalString stdenv.isAarch64 "sed -i 's/c++98/c++11/g' SConstruct";
2022-01-26 23:05:24 +00:00
meta = with lib; {
description = "Roc is a toolkit for real-time audio streaming over the network";
2022-01-26 23:05:24 +00:00
homepage = "https://github.com/roc-streaming/roc-toolkit";
license = licenses.mpl20;
maintainers = with maintainers; [bgamari];
2022-01-26 23:05:24 +00:00
platforms = platforms.unix;
};
2022-01-29 18:06:26 +00:00
}