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

pipewire: introduce roc-toolkit support

authored by Jörg Thalheim and committed by GitHub ff764c3b a96c4d14

+112 -2
+63
pkgs/development/libraries/audio/roc-toolkit/default.nix
··· 1 + { stdenv, 2 + lib, 3 + fetchFromGitHub, 4 + sconsPackages, 5 + ragel, 6 + gengetopt, 7 + pkg-config, 8 + libuv, 9 + openfecSupport ? true, 10 + openfec, 11 + libunwindSupport ? true, 12 + libunwind, 13 + pulseaudioSupport ? true, 14 + libpulseaudio 15 + }: 16 + 17 + stdenv.mkDerivation rec { 18 + pname = "roc-toolkit"; 19 + version = "0.1.5"; 20 + 21 + src = fetchFromGitHub { 22 + owner = "roc-streaming"; 23 + repo = "roc-toolkit"; 24 + rev = "v${version}"; 25 + sha256 = "sha256:1pld340zfch4p3qaf5anrspq7vmxrgf9ddsdsq92pk49axaaz19w"; 26 + }; 27 + 28 + nativeBuildInputs = [ 29 + sconsPackages.scons_3_0_1 30 + ragel 31 + gengetopt 32 + pkg-config 33 + ]; 34 + 35 + buildInputs = [ 36 + libuv 37 + libunwind 38 + openfec 39 + libpulseaudio 40 + ]; 41 + 42 + sconsFlags = 43 + [ "--disable-sox" 44 + "--disable-tests" ] ++ 45 + lib.optional (!libunwindSupport) "--disable-libunwind" ++ 46 + lib.optional (!pulseaudioSupport) "--disable-pulseaudio" ++ 47 + (if (!openfecSupport) 48 + then ["--disable-openfec"] 49 + else [ "--with-libraries=${openfec}/lib" 50 + "--with-openfec-includes=${openfec.dev}/include" ]); 51 + 52 + preConfigure = '' 53 + sconsFlags+=" --prefix=$out" 54 + ''; 55 + 56 + meta = with lib; { 57 + description = "Roc is a toolkit for real-time audio streaming over the network"; 58 + homepage = "https://github.com/roc-streaming/roc-toolkit"; 59 + license = licenses.mpl20; 60 + maintainers = with maintainers; [ bgamari ]; 61 + platforms = platforms.unix; 62 + }; 63 + }
+40
pkgs/development/libraries/openfec/default.nix
··· 1 + { stdenv, lib, fetchzip, cmake }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "openfec"; 5 + version = "1.4.2"; 6 + 7 + src = fetchzip { 8 + url = "http://openfec.org/files/openfec_v1_4_2.tgz"; 9 + sha256 = "sha256:0c2lg8afr7lqpzrsi0g44a6h6s7nq4vz7yc9vm2k57ph2y6r86la"; 10 + }; 11 + 12 + outputs = [ "out" "dev" ]; 13 + 14 + nativeBuildInputs = [ 15 + cmake 16 + ]; 17 + 18 + cmakeFlags = [ "-DDEBUG:STRING=OFF" ]; 19 + 20 + installPhase = 21 + let so = stdenv.hostPlatform.extensions.sharedLibrary; 22 + in '' 23 + # This is pretty horrible but sadly there is not installation procedure 24 + # provided. 25 + mkdir -p $dev/include 26 + cp -R ../src/* $dev/include 27 + find $dev/include -type f -a ! -iname '*.h' -delete 28 + 29 + install -D -m755 -t $out/lib ../bin/Release/libopenfec${so} 30 + ln -s libopenfec${so} $out/lib/libopenfec${so}.1 31 + ''; 32 + 33 + meta = with lib; { 34 + description = "Application-level Forward Erasure Correction codes"; 35 + homepage = "https://github.com/roc-streaming/openfec"; 36 + license = licenses.cecill-c; 37 + maintainers = with maintainers; [ bgamari ]; 38 + platforms = platforms.unix; 39 + }; 40 + }
+5 -2
pkgs/development/libraries/pipewire/default.nix
··· 54 54 , libpulseaudio 55 55 , zeroconfSupport ? true 56 56 , avahi 57 + , rocSupport ? true 58 + , roc-toolkit 57 59 }: 58 60 59 61 let ··· 134 136 ++ lib.optional ffmpegSupport ffmpeg 135 137 ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac ] 136 138 ++ lib.optional pulseTunnelSupport libpulseaudio 137 - ++ lib.optional zeroconfSupport avahi; 139 + ++ lib.optional zeroconfSupport avahi 140 + ++ lib.optional rocSupport roc-toolkit; 138 141 139 142 # Valgrind binary is required for running one optional test. 140 143 checkInputs = lib.optional withValgrind valgrind; ··· 147 150 "-Dpipewire_pulse_prefix=${placeholder "pulse"}" 148 151 "-Dlibjack-path=${placeholder "jack"}/lib" 149 152 "-Dlibcamera=${mesonEnable libcameraSupport}" 150 - "-Droc=disabled" 153 + "-Droc=${mesonEnable rocSupport}" 151 154 "-Dlibpulse=${mesonEnable pulseTunnelSupport}" 152 155 "-Davahi=${mesonEnable zeroconfSupport}" 153 156 "-Dgstreamer=${mesonEnable gstreamerSupport}"
+4
pkgs/top-level/all-packages.nix
··· 8366 8366 opendylan-bootstrap = opendylan_bin; 8367 8367 }; 8368 8368 8369 + openfec = callPackage ../development/libraries/openfec { }; 8370 + 8369 8371 ophis = python3Packages.callPackage ../development/compilers/ophis { }; 8370 8372 8371 8373 opendylan_bin = callPackage ../development/compilers/opendylan/bin.nix { }; ··· 9302 9304 rlwrap = callPackage ../tools/misc/rlwrap { }; 9303 9305 9304 9306 rmtrash = callPackage ../tools/misc/rmtrash { }; 9307 + 9308 + roc-toolkit = callPackage ../development/libraries/audio/roc-toolkit { }; 9305 9309 9306 9310 rockbox_utility = libsForQt5.callPackage ../tools/misc/rockbox-utility { }; 9307 9311