Merge pull request #153087 from bgamari/wip/roc-toolkit

pipewire: introduce roc-toolkit support
This commit is contained in:
Jörg Thalheim 2022-01-04 07:40:45 +00:00 committed by GitHub
commit ff764c3b0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 112 additions and 2 deletions

View file

@ -0,0 +1,63 @@
{ stdenv,
lib,
fetchFromGitHub,
sconsPackages,
ragel,
gengetopt,
pkg-config,
libuv,
openfecSupport ? true,
openfec,
libunwindSupport ? true,
libunwind,
pulseaudioSupport ? true,
libpulseaudio
}:
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
];
buildInputs = [
libuv
libunwind
openfec
libpulseaudio
];
sconsFlags =
[ "--disable-sox"
"--disable-tests" ] ++
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" ]);
preConfigure = ''
sconsFlags+=" --prefix=$out"
'';
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;
};
}

View file

@ -0,0 +1,40 @@
{ stdenv, lib, fetchzip, cmake }:
stdenv.mkDerivation rec {
pname = "openfec";
version = "1.4.2";
src = fetchzip {
url = "http://openfec.org/files/openfec_v1_4_2.tgz";
sha256 = "sha256:0c2lg8afr7lqpzrsi0g44a6h6s7nq4vz7yc9vm2k57ph2y6r86la";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
cmake
];
cmakeFlags = [ "-DDEBUG:STRING=OFF" ];
installPhase =
let so = stdenv.hostPlatform.extensions.sharedLibrary;
in ''
# This is pretty horrible but sadly there is not installation procedure
# provided.
mkdir -p $dev/include
cp -R ../src/* $dev/include
find $dev/include -type f -a ! -iname '*.h' -delete
install -D -m755 -t $out/lib ../bin/Release/libopenfec${so}
ln -s libopenfec${so} $out/lib/libopenfec${so}.1
'';
meta = with lib; {
description = "Application-level Forward Erasure Correction codes";
homepage = "https://github.com/roc-streaming/openfec";
license = licenses.cecill-c;
maintainers = with maintainers; [ bgamari ];
platforms = platforms.unix;
};
}

View file

@ -54,6 +54,8 @@
, libpulseaudio
, zeroconfSupport ? true
, avahi
, rocSupport ? true
, roc-toolkit
}:
let
@ -134,7 +136,8 @@ let
++ lib.optional ffmpegSupport ffmpeg
++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac ]
++ lib.optional pulseTunnelSupport libpulseaudio
++ lib.optional zeroconfSupport avahi;
++ lib.optional zeroconfSupport avahi
++ lib.optional rocSupport roc-toolkit;
# Valgrind binary is required for running one optional test.
checkInputs = lib.optional withValgrind valgrind;
@ -147,7 +150,7 @@ let
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
"-Dlibjack-path=${placeholder "jack"}/lib"
"-Dlibcamera=${mesonEnable libcameraSupport}"
"-Droc=disabled"
"-Droc=${mesonEnable rocSupport}"
"-Dlibpulse=${mesonEnable pulseTunnelSupport}"
"-Davahi=${mesonEnable zeroconfSupport}"
"-Dgstreamer=${mesonEnable gstreamerSupport}"

View file

@ -8366,6 +8366,8 @@ with pkgs;
opendylan-bootstrap = opendylan_bin;
};
openfec = callPackage ../development/libraries/openfec { };
ophis = python3Packages.callPackage ../development/compilers/ophis { };
opendylan_bin = callPackage ../development/compilers/opendylan/bin.nix { };
@ -9303,6 +9305,8 @@ with pkgs;
rmtrash = callPackage ../tools/misc/rmtrash { };
roc-toolkit = callPackage ../development/libraries/audio/roc-toolkit { };
rockbox_utility = libsForQt5.callPackage ../tools/misc/rockbox-utility { };
rosegarden = libsForQt514.callPackage ../applications/audio/rosegarden { };