Merge pull request #153087 from bgamari/wip/roc-toolkit
pipewire: introduce roc-toolkit support
This commit is contained in:
commit
ff764c3b0f
63
pkgs/development/libraries/audio/roc-toolkit/default.nix
Normal file
63
pkgs/development/libraries/audio/roc-toolkit/default.nix
Normal 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;
|
||||
};
|
||||
}
|
40
pkgs/development/libraries/openfec/default.nix
Normal file
40
pkgs/development/libraries/openfec/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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}"
|
||||
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user