From 96dd839e8f34eadbba1ab425eaa03bcbb72de8a5 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Tue, 4 Oct 2022 21:27:48 +0300 Subject: [PATCH] pipewire: 0.3.58 -> 0.3.59 --- .../pipewire/daemon/filter-chain.conf.json | 28 ++++++++++++++ .../pipewire/daemon/pipewire-avb.conf.json | 38 +++++++++++++++++++ .../libraries/pipewire/default.nix | 15 ++++++-- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json create mode 100644 nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json diff --git a/nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json b/nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json new file mode 100644 index 000000000000..689fca88359b --- /dev/null +++ b/nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json @@ -0,0 +1,28 @@ +{ + "context.properties": { + "log.level": 0 + }, + "context.spa-libs": { + "audio.convert.*": "audioconvert/libspa-audioconvert", + "support.*": "support/libspa-support" + }, + "context.modules": [ + { + "name": "libpipewire-module-rt", + "args": {}, + "flags": [ + "ifexists", + "nofail" + ] + }, + { + "name": "libpipewire-module-protocol-native" + }, + { + "name": "libpipewire-module-client-node" + }, + { + "name": "libpipewire-module-adapter" + } + ] +} diff --git a/nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json b/nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json new file mode 100644 index 000000000000..4f669895d87b --- /dev/null +++ b/nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json @@ -0,0 +1,38 @@ +{ + "context.properties": {}, + "context.spa-libs": { + "audio.convert.*": "audioconvert/libspa-audioconvert", + "support.*": "support/libspa-support" + }, + "context.modules": [ + { + "name": "libpipewire-module-rt", + "args": { + "nice.level": -11 + }, + "flags": [ + "ifexists", + "nofail" + ] + }, + { + "name": "libpipewire-module-protocol-native" + }, + { + "name": "libpipewire-module-client-node" + }, + { + "name": "libpipewire-module-adapter" + }, + { + "name": "libpipewire-module-avb", + "args": {} + } + ], + "context.exec": [], + "stream.properties": {}, + "avb.properties": { + "ifname": "enp3s0", + "vm.overrides": {} + } +} diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index a02ecc1e9b74..f2907afab018 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -2,6 +2,7 @@ , lib , buildPackages , fetchFromGitLab +, fetchpatch , removeReferencesTo , python3 , meson @@ -45,6 +46,7 @@ , sbc , libfreeaptx , ldacbt +, liblc3 , fdk_aac , libopus , nativeHspSupport ? true @@ -70,7 +72,7 @@ let self = stdenv.mkDerivation rec { pname = "pipewire"; - version = "0.3.58"; + version = "0.3.59"; outputs = [ "out" @@ -88,7 +90,7 @@ let owner = "pipewire"; repo = "pipewire"; rev = version; - sha256 = "sha256-r8sDXyXwtA2o2xqglOI8XflttSScrqJ57cj1//k2tZ8="; + sha256 = "sha256-4wDtdgkjBRlthhwbI3cSQFnbr+gxPQP5j5YnrWiQVp4="; }; patches = [ @@ -104,6 +106,12 @@ let ./0090-pipewire-config-template-paths.patch # Place SPA data files in lib output to avoid dependency cycles ./0095-spa-data-dir.patch + + # remove when updating to 0.3.60 + (fetchpatch { # filter-chain: iterate the port correctly + url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/94a64268613adac8ef6f3e6c1f04468220540d00.patch"; + sha256 = "sha256-IDTB7NgadgR3vKv97Nvd9pBfnOnMi21YsvLdD1Ew7HE="; + }) ]; nativeBuildInputs = [ @@ -134,7 +142,7 @@ let ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ] ++ lib.optionals libcameraSupport [ libcamera libdrm ] ++ lib.optional ffmpegSupport ffmpeg - ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac libopus ] + ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt liblc3 sbc fdk_aac libopus ] ++ lib.optional pulseTunnelSupport libpulseaudio ++ lib.optional zeroconfSupport avahi ++ lib.optional raopSupport openssl @@ -167,6 +175,7 @@ let "-Dbluez5-backend-ofono=${mesonEnableFeature ofonoSupport}" "-Dbluez5-backend-hsphfpd=${mesonEnableFeature hsphfpdSupport}" "-Dbluez5-codec-lc3plus=disabled" + "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}" "-Dsysconfdir=/etc" "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire" "-Draop=${mesonEnableFeature raopSupport}"