Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions pkgs/development/libraries/audio/roc-toolkit/default.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 40 additions & 0 deletions pkgs/development/libraries/openfec/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
15 changes: 11 additions & 4 deletions pkgs/development/libraries/pipewire/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
, webrtc-audio-processing
, ncurses
, readline81 # meson can't find <7 as those versions don't have a .pc file
, lilv
, openssl
, makeFontsConf
, callPackage
, nixosTests
Expand Down Expand Up @@ -52,6 +54,8 @@
, libpulseaudio
, zeroconfSupport ? true
, avahi
, rocSupport ? true
, roc-toolkit
}:

let
Expand All @@ -64,7 +68,7 @@ let

self = stdenv.mkDerivation rec {
pname = "pipewire";
version = "0.3.40";
version = "0.3.42";

outputs = [
"out"
Expand All @@ -82,7 +86,7 @@ let
owner = "pipewire";
repo = "pipewire";
rev = version;
sha256 = "sha256-eY6uQa4+sC6yUWhF4IpAgRoppwhHO4s5fIMXOkS0z7A=";
sha256 = "sha256-Iyd5snOt+iCT7W0+FlfvhMUZo/gF+zr9JX4HIGVdHto=";
};

patches = [
Expand Down Expand Up @@ -117,7 +121,9 @@ let
libjack2
libusb1
libsndfile
lilv
ncurses
openssl
readline81
udev
vulkan-headers
Expand All @@ -130,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;
Expand All @@ -143,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}"
Expand Down
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down Expand Up @@ -9311,6 +9313,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 { };
Expand Down