git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #128540 from arcnmx/pipewire-0.3.31

Pipewire 0.3.31

commit8978759e652355f0ccca661f352a937fd4c544b0 authorJan Tojnar <jtojnar@gmail.com> dateWed 7 Jul 2021, 20:02 (5 years ago) parentb749ff4ef532a0
6 files changed+218−12
nixos/modules/services/desktops/pipewire/bluez-hardware.conf.json+197 nixos/modules/services/desktops/pipewire/jack.conf.json+1−1 nixos/modules/services/desktops/pipewire/pipewire-media-session.nix+6 pkgs/development/libraries/pipewire/0055-pipewire-media-session-path.patch+2−5 pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch+4−4 pkgs/development/libraries/pipewire/default.nix+8−2
nixos/modules/services/desktops/pipewire/bluez-hardware.conf.jsonnew file+197
@@ -0,0 +1,197 @@
1+{
2+ "bluez5.features.device": [
3+ {
4+ "name": "Air 1 Plus",
5+ "no-features": [
6+ "hw-volume-mic"
7+ ]
8+ },
9+ {
10+ "name": "AirPods",
11+ "no-features": [
12+ "msbc-alt1",
13+ "msbc-alt1-rtl"
14+ ]
15+ },
16+ {
17+ "name": "AirPods Pro",
18+ "no-features": [
19+ "msbc-alt1",
20+ "msbc-alt1-rtl"
21+ ]
22+ },
23+ {
24+ "name": "AXLOIE Goin",
25+ "no-features": [
26+ "msbc-alt1",
27+ "msbc-alt1-rtl"
28+ ]
29+ },
30+ {
31+ "name": "JBL Endurance RUN BT",
32+ "no-features": [
33+ "msbc-alt1",
34+ "msbc-alt1-rtl",
35+ "sbc-xq"
36+ ]
37+ },
38+ {
39+ "name": "JBL LIVE650BTNC"
40+ },
41+ {
42+ "name": "Soundcore Life P2-L",
43+ "no-features": [
44+ "msbc-alt1",
45+ "msbc-alt1-rtl"
46+ ]
47+ },
48+ {
49+ "name": "Urbanista Stockholm Plus",
50+ "no-features": [
51+ "msbc-alt1",
52+ "msbc-alt1-rtl"
53+ ]
54+ },
55+ {
56+ "address": "~^94:16:25:",
57+ "no-features": [
58+ "hw-volume"
59+ ]
60+ },
61+ {
62+ "address": "~^9c:64:8b:",
63+ "no-features": [
64+ "hw-volume"
65+ ]
66+ },
67+ {
68+ "address": "~^a0:e9:db:",
69+ "no-features": [
70+ "hw-volume"
71+ ]
72+ },
73+ {
74+ "address": "~^0c:a6:94:",
75+ "no-features": [
76+ "hw-volume"
77+ ]
78+ },
79+ {
80+ "address": "~^00:14:02:",
81+ "no-features": [
82+ "hw-volume"
83+ ]
84+ },
85+ {
86+ "address": "~^44:5e:f3:",
87+ "no-features": [
88+ "hw-volume"
89+ ]
90+ },
91+ {
92+ "address": "~^d4:9c:28:",
93+ "no-features": [
94+ "hw-volume"
95+ ]
96+ },
97+ {
98+ "address": "~^00:18:6b:",
99+ "no-features": [
100+ "hw-volume"
101+ ]
102+ },
103+ {
104+ "address": "~^b8:ad:3e:",
105+ "no-features": [
106+ "hw-volume"
107+ ]
108+ },
109+ {
110+ "address": "~^a0:e9:db:",
111+ "no-features": [
112+ "hw-volume"
113+ ]
114+ },
115+ {
116+ "address": "~^00:24:1c:",
117+ "no-features": [
118+ "hw-volume"
119+ ]
120+ },
121+ {
122+ "address": "~^00:11:b1:",
123+ "no-features": [
124+ "hw-volume"
125+ ]
126+ },
127+ {
128+ "address": "~^a4:15:66:",
129+ "no-features": [
130+ "hw-volume"
131+ ]
132+ },
133+ {
134+ "address": "~^00:14:f1:",
135+ "no-features": [
136+ "hw-volume"
137+ ]
138+ },
139+ {
140+ "address": "~^00:26:7e:",
141+ "no-features": [
142+ "hw-volume"
143+ ]
144+ },
145+ {
146+ "address": "~^90:03:b7:",
147+ "no-features": [
148+ "hw-volume"
149+ ]
150+ }
151+ ],
152+ "bluez5.features.adapter": [
153+ {
154+ "bus-type": "usb",
155+ "vendor-id": "usb:0bda"
156+ },
157+ {
158+ "bus-type": "usb",
159+ "no-features": [
160+ "msbc-alt1-rtl"
161+ ]
162+ },
163+ {
164+ "no-features": [
165+ "msbc-alt1-rtl"
166+ ]
167+ }
168+ ],
169+ "bluez5.features.kernel": [
170+ {
171+ "sysname": "Linux",
172+ "release": "~^[0-4]\\.",
173+ "no-features": [
174+ "msbc-alt1",
175+ "msbc-alt1-rtl"
176+ ]
177+ },
178+ {
179+ "sysname": "Linux",
180+ "release": "~^5\\.[1-7]\\.",
181+ "no-features": [
182+ "msbc-alt1",
183+ "msbc-alt1-rtl"
184+ ]
185+ },
186+ {
187+ "sysname": "Linux",
188+ "release": "~^5\\.(8|9|10)\\.",
189+ "no-features": [
190+ "msbc-alt1"
191+ ]
192+ },
193+ {
194+ "no-features": []
195+ }
196+ ]
197+}
nixos/modules/services/desktops/pipewire/jack.conf.json+1−1
@@ -7,7 +7,7 @@
77 },
88 "context.modules": [
99 {
10− "name": "libpipewire-module-rtkit",
10+ "name": "libpipewire-module-rt",
1111 "args": {},
1212 "flags": [
1313 "ifexists",
nixos/modules/services/desktops/pipewire/pipewire-media-session.nix+6
@@ -15,6 +15,7 @@ let
1515 defaults = {
1616 alsa-monitor = (builtins.fromJSON (builtins.readFile ./alsa-monitor.conf.json));
1717 bluez-monitor = (builtins.fromJSON (builtins.readFile ./bluez-monitor.conf.json));
18+ bluez-hardware = (builtins.fromJSON (builtins.readFile ./bluez-hardware.conf.json));
1819 media-session = (builtins.fromJSON (builtins.readFile ./media-session.conf.json));
1920 v4l2-monitor = (builtins.fromJSON (builtins.readFile ./v4l2-monitor.conf.json));
2021 };
@@ -22,6 +23,7 @@ let
2223 configs = {
2324 alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor;
2425 bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor;
26+ bluez-hardware = defaults.bluez-hardware;
2527 media-session = recursiveUpdate defaults.media-session cfg.config.media-session;
2628 v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor;
2729 };
@@ -120,6 +122,10 @@ in {
120122 mkIf config.services.pipewire.pulse.enable {
121123 source = json.generate "bluez-monitor.conf" configs.bluez-monitor;
122124 };
125+ environment.etc."pipewire/media-session.d/bluez-hardware.conf" =
126+ mkIf config.services.pipewire.pulse.enable {
127+ source = json.generate "bluez-hardware.conf" configs.bluez-hardware;
128+ };
123129
124130 environment.etc."pipewire/media-session.d/with-jack" =
125131 mkIf config.services.pipewire.jack.enable {
pkgs/development/libraries/pipewire/0055-pipewire-media-session-path.patch+2−5
@@ -2,16 +2,13 @@ diff --git a/meson_options.txt b/meson_options.txt
22index 93b5e2a9..1b915ac3 100644
33--- a/meson_options.txt
44+++ b/meson_options.txt
5−@@ -13,6 +13,9 @@ option('media-session',
6− description: 'Build and install pipewire-media-session',
5+@@ -200,3 +200,6 @@ option('media-session',
76 type: 'feature',
87 value: 'auto')
98+option('media-session-prefix',
109+ description: 'Install directory for pipewire-media-session and its support files',
1110+ type: 'string')
12− option('man',
13− description: 'Build manpages',
14− type: 'feature',
11+ option('session-managers',
1512diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
1613index 1edebb2d..251270eb 100644
1714--- a/src/daemon/systemd/user/meson.build
pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch+4−4
@@ -6,8 +6,8 @@ index bbafa134..227d3e06 100644
66 # access.allowed to list an array of paths of allowed
77 # apps.
88 #access.allowed = [
9−- # @media_session_path@
10−+ # <media_session_path>
9+- # @session_manager_path@
10++ # <session_manager_path>
1111 #]
1212
1313 # An array of rejected paths.
@@ -15,8 +15,8 @@ index bbafa134..227d3e06 100644
1515 # but it is better to start it as a systemd service.
1616 # Run the session manager with -h for options.
1717 #
18−- @comment@{ path = "@media_session_path@" args = "" }
19−+ @comment@{ path = "<media_session_path>" args = "" }
18+- @comment@{ path = "@session_manager_path@" args = "@session_manager_args@" }
19++ @comment@{ path = "<session_manager_path>" args = "@session_manager_args@" }
2020 #
2121 # You can optionally start the pulseaudio-server here as well
2222 # but it is better to start it as a systemd service.
pkgs/development/libraries/pipewire/default.nix+8−2
@@ -14,6 +14,7 @@
1414, dbus
1515, alsa-lib
1616, libjack2
17+, libusb1
1718, udev
1819, libva
1920, libsndfile
@@ -43,10 +44,11 @@ let
4344 };
4445
4546 mesonEnable = b: if b then "enabled" else "disabled";
47+ mesonList = l: "[" + lib.concatStringsSep "," l + "]";
4648
4749 self = stdenv.mkDerivation rec {
4850 pname = "pipewire";
49− version = "0.3.30";
51+ version = "0.3.31";
5052
5153 outputs = [
5254 "out"
@@ -64,7 +66,7 @@ let
6466 owner = "pipewire";
6567 repo = "pipewire";
6668 rev = version;
67− sha256 = "sha256-DnaPvZoDaegjtJNKBmCJEAZe5FQBnSER79FPnxiWQUE=";
69+ sha256 = "1dirz69ami7bcgy6hhh0ffi9gzwcy9idg94nvknwvwkjw4zm8m79";
6870 };
6971
7072 patches = [
@@ -96,6 +98,7 @@ let
9698 dbus
9799 glib
98100 libjack2
101+ libusb1
99102 libsndfile
100103 ncurses
101104 udev
@@ -122,6 +125,7 @@ let
122125 "-Dmedia-session-prefix=${placeholder "mediaSession"}"
123126 "-Dlibjack-path=${placeholder "jack"}/lib"
124127 "-Dlibcamera=disabled"
128+ "-Droc=disabled"
125129 "-Dlibpulse=${mesonEnable pulseTunnelSupport}"
126130 "-Davahi=${mesonEnable zeroconfSupport}"
127131 "-Dgstreamer=${mesonEnable gstreamerSupport}"
@@ -133,6 +137,7 @@ let
133137 "-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}"
134138 "-Dsysconfdir=/etc"
135139 "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
140+ "-Dsession-managers=${mesonList (lib.optional withMediaSession "media-session")}"
136141 ];
137142
138143 FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
@@ -187,6 +192,7 @@ let
187192 paths-out-media-session = [
188193 "nix-support/etc/pipewire/media-session.d/alsa-monitor.conf.json"
189194 "nix-support/etc/pipewire/media-session.d/bluez-monitor.conf.json"
195+ "nix-support/etc/pipewire/media-session.d/bluez-hardware.conf.json"
190196 "nix-support/etc/pipewire/media-session.d/media-session.conf.json"
191197 "nix-support/etc/pipewire/media-session.d/v4l2-monitor.conf.json"
192198 ];