Merge pull request #144009 from jansol/release-21.05
[Backport release-21.05] pipewire: 0.3.36 -> 0.3.39
This commit is contained in:
commit
372e59d2af
|
@ -1,250 +0,0 @@
|
||||||
{
|
|
||||||
"bluez5.features.device": [
|
|
||||||
{
|
|
||||||
"name": "Air 1 Plus",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume-mic"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "AirPods",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "AirPods Pro",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "AXLOIE Goin",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "BAA 100",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "D50s",
|
|
||||||
"address": "~^00:13:ef:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "JBL Endurance RUN BT",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl",
|
|
||||||
"sbc-xq"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "JBL LIVE650BTNC"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Motorola DC800",
|
|
||||||
"no-features": [
|
|
||||||
"sbc-xq"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Motorola S305",
|
|
||||||
"no-features": [
|
|
||||||
"sbc-xq"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Soundcore Life P2-L",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Urbanista Stockholm Plus",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^94:16:25:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^9c:64:8b:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^a0:e9:db:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^0c:a6:94:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^00:14:02:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^44:5e:f3:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^d4:9c:28:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^00:18:6b:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^b8:ad:3e:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^a0:e9:db:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^00:24:1c:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^00:11:b1:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^a4:15:66:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^00:14:f1:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^00:26:7e:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "~^90:03:b7:",
|
|
||||||
"no-features": [
|
|
||||||
"hw-volume"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bluez5.features.adapter": [
|
|
||||||
{
|
|
||||||
"bus-type": "usb",
|
|
||||||
"vendor-id": "usb:0bda"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bus-type": "usb",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bluez5.features.kernel": [
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^[0-4]\\.",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^5\\.[1-7]\\.",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1",
|
|
||||||
"msbc-alt1-rtl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^5\\.(8|9)\\.",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^5\\.10\\.(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|51|52|53|54|55|56|57|58|59|60|61)($|[^0-9])",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^5\\.12\\.(18|19)($|[^0-9])",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^5\\.13\\.(3|4|5|6|7|8|9|10|11|12|13)($|[^0-9])",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sysname": "Linux",
|
|
||||||
"release": "~^5\\.14($|[^0-9])",
|
|
||||||
"no-features": [
|
|
||||||
"msbc-alt1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"no-features": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -13,17 +13,15 @@ let
|
||||||
# Use upstream config files passed through spa-json-dump as the base
|
# Use upstream config files passed through spa-json-dump as the base
|
||||||
# Patched here as necessary for them to work with this module
|
# Patched here as necessary for them to work with this module
|
||||||
defaults = {
|
defaults = {
|
||||||
alsa-monitor = (builtins.fromJSON (builtins.readFile ./alsa-monitor.conf.json));
|
alsa-monitor = (builtins.fromJSON (builtins.readFile ./media-session/alsa-monitor.conf.json));
|
||||||
bluez-monitor = (builtins.fromJSON (builtins.readFile ./bluez-monitor.conf.json));
|
bluez-monitor = (builtins.fromJSON (builtins.readFile ./media-session/bluez-monitor.conf.json));
|
||||||
bluez-hardware = (builtins.fromJSON (builtins.readFile ./bluez-hardware.conf.json));
|
media-session = (builtins.fromJSON (builtins.readFile ./media-session/media-session.conf.json));
|
||||||
media-session = (builtins.fromJSON (builtins.readFile ./media-session.conf.json));
|
v4l2-monitor = (builtins.fromJSON (builtins.readFile ./media-session/v4l2-monitor.conf.json));
|
||||||
v4l2-monitor = (builtins.fromJSON (builtins.readFile ./v4l2-monitor.conf.json));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
configs = {
|
configs = {
|
||||||
alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor;
|
alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor;
|
||||||
bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor;
|
bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor;
|
||||||
bluez-hardware = defaults.bluez-hardware;
|
|
||||||
media-session = recursiveUpdate defaults.media-session cfg.config.media-session;
|
media-session = recursiveUpdate defaults.media-session cfg.config.media-session;
|
||||||
v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor;
|
v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor;
|
||||||
};
|
};
|
||||||
|
@ -45,8 +43,8 @@ in {
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.pipewire.mediaSession;
|
default = pkgs.pipewire-media-session;
|
||||||
example = literalExample "pkgs.pipewire.mediaSession";
|
defaultText = literalExpression "pkgs.pipewire-media-session";
|
||||||
description = ''
|
description = ''
|
||||||
The pipewire-media-session derivation to use.
|
The pipewire-media-session derivation to use.
|
||||||
'';
|
'';
|
||||||
|
@ -57,7 +55,7 @@ in {
|
||||||
type = json.type;
|
type = json.type;
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for the media session core. For details see
|
Configuration for the media session core. For details see
|
||||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/media-session.d/media-session.conf
|
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/media-session.conf
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
@ -66,7 +64,7 @@ in {
|
||||||
type = json.type;
|
type = json.type;
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for the alsa monitor. For details see
|
Configuration for the alsa monitor. For details see
|
||||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/media-session.d/alsa-monitor.conf
|
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/alsa-monitor.conf
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
@ -75,7 +73,7 @@ in {
|
||||||
type = json.type;
|
type = json.type;
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for the bluez5 monitor. For details see
|
Configuration for the bluez5 monitor. For details see
|
||||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/media-session.d/bluez-monitor.conf
|
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/bluez-monitor.conf
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
@ -84,7 +82,7 @@ in {
|
||||||
type = json.type;
|
type = json.type;
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for the V4L2 monitor. For details see
|
Configuration for the V4L2 monitor. For details see
|
||||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/media-session.d/v4l2-monitor.conf
|
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/v4l2-monitor.conf
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
@ -122,10 +120,6 @@ in {
|
||||||
mkIf config.services.pipewire.pulse.enable {
|
mkIf config.services.pipewire.pulse.enable {
|
||||||
source = json.generate "bluez-monitor.conf" configs.bluez-monitor;
|
source = json.generate "bluez-monitor.conf" configs.bluez-monitor;
|
||||||
};
|
};
|
||||||
environment.etc."pipewire/media-session.d/bluez-hardware.conf" =
|
|
||||||
mkIf config.services.pipewire.pulse.enable {
|
|
||||||
source = json.generate "bluez-hardware.conf" configs.bluez-hardware;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc."pipewire/media-session.d/with-jack" =
|
environment.etc."pipewire/media-session.d/with-jack" =
|
||||||
mkIf config.services.pipewire.jack.enable {
|
mkIf config.services.pipewire.jack.enable {
|
||||||
|
|
|
@ -22,12 +22,11 @@ let
|
||||||
# Use upstream config files passed through spa-json-dump as the base
|
# Use upstream config files passed through spa-json-dump as the base
|
||||||
# Patched here as necessary for them to work with this module
|
# Patched here as necessary for them to work with this module
|
||||||
defaults = {
|
defaults = {
|
||||||
client = builtins.fromJSON (builtins.readFile ./client.conf.json);
|
client = builtins.fromJSON (builtins.readFile ./daemon/client.conf.json);
|
||||||
client-rt = builtins.fromJSON (builtins.readFile ./client-rt.conf.json);
|
client-rt = builtins.fromJSON (builtins.readFile ./daemon/client-rt.conf.json);
|
||||||
jack = builtins.fromJSON (builtins.readFile ./jack.conf.json);
|
jack = builtins.fromJSON (builtins.readFile ./daemon/jack.conf.json);
|
||||||
# Remove session manager invocation from the upstream generated file, it points to the wrong path
|
pipewire = builtins.fromJSON (builtins.readFile ./daemon/pipewire.conf.json);
|
||||||
pipewire = builtins.fromJSON (builtins.readFile ./pipewire.conf.json);
|
pipewire-pulse = builtins.fromJSON (builtins.readFile ./daemon/pipewire-pulse.conf.json);
|
||||||
pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
configs = {
|
configs = {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/meson_options.txt b/meson_options.txt
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
index 66791f3a..93b5e2a9 100644
|
index 71c2e35e9..a0f380c04 100644
|
||||||
--- a/meson_options.txt
|
--- a/meson_options.txt
|
||||||
+++ b/meson_options.txt
|
+++ b/meson_options.txt
|
||||||
@@ -172,6 +172,9 @@ option('udev',
|
@@ -176,6 +176,9 @@ option('udev',
|
||||||
option('udevrulesdir',
|
option('udevrulesdir',
|
||||||
type : 'string',
|
type : 'string',
|
||||||
description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
|
description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
|
||||||
|
@ -13,7 +13,7 @@ index 66791f3a..93b5e2a9 100644
|
||||||
type : 'string',
|
type : 'string',
|
||||||
description : 'Directory for user systemd units (defaults to /usr/lib/systemd/user)')
|
description : 'Directory for user systemd units (defaults to /usr/lib/systemd/user)')
|
||||||
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
|
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
|
||||||
index aa30a86f..1edebb2d 100644
|
index 5bd134537..5a3ca9ed5 100644
|
||||||
--- a/src/daemon/systemd/user/meson.build
|
--- a/src/daemon/systemd/user/meson.build
|
||||||
+++ b/src/daemon/systemd/user/meson.build
|
+++ b/src/daemon/systemd/user/meson.build
|
||||||
@@ -9,7 +9,7 @@ install_data(
|
@@ -9,7 +9,7 @@ install_data(
|
||||||
|
@ -22,6 +22,6 @@ index aa30a86f..1edebb2d 100644
|
||||||
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
||||||
-systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
-systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
||||||
+systemd_config.set('PW_PULSE_BINARY', get_option('pipewire_pulse_prefix') / 'bin/pipewire-pulse')
|
+systemd_config.set('PW_PULSE_BINARY', get_option('pipewire_pulse_prefix') / 'bin/pipewire-pulse')
|
||||||
systemd_config.set('PW_MEDIA_SESSION_BINARY', pipewire_bindir / 'pipewire-media-session')
|
|
||||||
|
|
||||||
configure_file(input : 'pipewire.service.in',
|
configure_file(input : 'pipewire.service.in',
|
||||||
|
output : 'pipewire.service',
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
diff --git a/meson_options.txt b/meson_options.txt
|
|
||||||
index 93b5e2a9..1b915ac3 100644
|
|
||||||
--- a/meson_options.txt
|
|
||||||
+++ b/meson_options.txt
|
|
||||||
@@ -200,3 +200,6 @@ option('media-session',
|
|
||||||
type: 'feature',
|
|
||||||
value: 'auto')
|
|
||||||
+option('media-session-prefix',
|
|
||||||
+ description: 'Install directory for pipewire-media-session and its support files',
|
|
||||||
+ type: 'string')
|
|
||||||
option('session-managers',
|
|
||||||
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
|
|
||||||
index 1edebb2d..251270eb 100644
|
|
||||||
--- a/src/daemon/systemd/user/meson.build
|
|
||||||
+++ b/src/daemon/systemd/user/meson.build
|
|
||||||
@@ -10,7 +10,7 @@ install_data(
|
|
||||||
systemd_config = configuration_data()
|
|
||||||
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
|
||||||
systemd_config.set('PW_PULSE_BINARY', get_option('pipewire_pulse_prefix') / 'bin/pipewire-pulse')
|
|
||||||
-systemd_config.set('PW_MEDIA_SESSION_BINARY', pipewire_bindir / 'pipewire-media-session')
|
|
||||||
+systemd_config.set('PW_MEDIA_SESSION_BINARY', get_option('media-session-prefix') / 'bin/pipewire-media-session')
|
|
||||||
|
|
||||||
configure_file(input : 'pipewire.service.in',
|
|
||||||
output : 'pipewire.service',
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
|
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
|
||||||
index 95632c250..a88aac6e2 100644
|
index 648e13069..50f767f0c 100644
|
||||||
--- a/src/daemon/pipewire.conf.in
|
--- a/src/daemon/pipewire.conf.in
|
||||||
+++ b/src/daemon/pipewire.conf.in
|
+++ b/src/daemon/pipewire.conf.in
|
||||||
@@ -131,7 +131,7 @@ context.modules = [
|
@@ -131,7 +131,7 @@ context.modules = [
|
||||||
|
@ -15,8 +15,8 @@ index 95632c250..a88aac6e2 100644
|
||||||
# but it is better to start it as a systemd service.
|
# but it is better to start it as a systemd service.
|
||||||
# Run the session manager with -h for options.
|
# Run the session manager with -h for options.
|
||||||
#
|
#
|
||||||
- @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" }
|
- @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" }
|
||||||
+ @sm_comment@{ path = "<session_manager_path>" args = "@session_manager_args@" }
|
+ @sm_comment@{ path = "<session_manager_path>" args = "@session_manager_args@" }
|
||||||
#
|
#
|
||||||
# You can optionally start the pulseaudio-server here as well
|
# You can optionally start the pulseaudio-server here as well
|
||||||
# but it is better to start it as a systemd service.
|
# but it is better to start it as a systemd service.
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 56599ebd1..3bed2d3e3 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -54,7 +54,7 @@ else
|
||||||
|
endif
|
||||||
|
|
||||||
|
spa_plugindir = pipewire_libdir / spa_name
|
||||||
|
-spa_datadir = pipewire_datadir / spa_name
|
||||||
|
+spa_datadir = pipewire_libdir / spa_name
|
||||||
|
|
||||||
|
alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
|
|
@ -1,6 +1,7 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
|
, fetchpatch
|
||||||
, removeReferencesTo
|
, removeReferencesTo
|
||||||
, python3
|
, python3
|
||||||
, meson
|
, meson
|
||||||
|
@ -24,6 +25,7 @@
|
||||||
, vulkan-loader
|
, vulkan-loader
|
||||||
, webrtc-audio-processing
|
, webrtc-audio-processing
|
||||||
, ncurses
|
, ncurses
|
||||||
|
, readline81 # meson can't find <7 as those versions don't have a .pc file
|
||||||
, makeFontsConf
|
, makeFontsConf
|
||||||
, callPackage
|
, callPackage
|
||||||
, nixosTests
|
, nixosTests
|
||||||
|
@ -58,7 +60,7 @@ let
|
||||||
|
|
||||||
self = stdenv.mkDerivation rec {
|
self = stdenv.mkDerivation rec {
|
||||||
pname = "pipewire";
|
pname = "pipewire";
|
||||||
version = "0.3.36";
|
version = "0.3.39";
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
|
@ -68,7 +70,6 @@ let
|
||||||
"dev"
|
"dev"
|
||||||
"doc"
|
"doc"
|
||||||
"man"
|
"man"
|
||||||
"mediaSession"
|
|
||||||
"installedTests"
|
"installedTests"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@ let
|
||||||
owner = "pipewire";
|
owner = "pipewire";
|
||||||
repo = "pipewire";
|
repo = "pipewire";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-kwoffB0Hi84T4Q0NaxLxsCyPV4R0LayX9kHmXU/vRPA=";
|
sha256 = "sha256-peTS1+NuQxZg1rrv8DrnJW5BR9yReleqooIwhZWHLjM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -85,14 +86,20 @@ let
|
||||||
./0040-alsa-profiles-use-libdir.patch
|
./0040-alsa-profiles-use-libdir.patch
|
||||||
# Change the path of the pipewire-pulse binary in the service definition.
|
# Change the path of the pipewire-pulse binary in the service definition.
|
||||||
./0050-pipewire-pulse-path.patch
|
./0050-pipewire-pulse-path.patch
|
||||||
# Change the path of the pipewire-media-session binary in the service definition.
|
|
||||||
./0055-pipewire-media-session-path.patch
|
|
||||||
# Move installed tests into their own output.
|
# Move installed tests into their own output.
|
||||||
./0070-installed-tests-path.patch
|
./0070-installed-tests-path.patch
|
||||||
# Add option for changing the config install directory
|
# Add option for changing the config install directory
|
||||||
./0080-pipewire-config-dir.patch
|
./0080-pipewire-config-dir.patch
|
||||||
# Remove output paths from the comments in the config templates to break dependency cycles
|
# Remove output paths from the comments in the config templates to break dependency cycles
|
||||||
./0090-pipewire-config-template-paths.patch
|
./0090-pipewire-config-template-paths.patch
|
||||||
|
# Place SPA data files in lib output to avoid dependency cycles
|
||||||
|
./0095-spa-data-dir.patch
|
||||||
|
# Fix compilation on some architectures
|
||||||
|
# XXX: REMOVE ON NEXT RELEASE
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/651f0decea5f83730c271e9bed03cdd0048fcd49.diff";
|
||||||
|
sha256 = "1bmpi5qn750mcspaw7m57ww0503sl9781jswqby4gr0f7c5wmqvj";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -113,6 +120,7 @@ let
|
||||||
libusb1
|
libusb1
|
||||||
libsndfile
|
libsndfile
|
||||||
ncurses
|
ncurses
|
||||||
|
readline81
|
||||||
udev
|
udev
|
||||||
vulkan-headers
|
vulkan-headers
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
|
@ -128,12 +136,10 @@ let
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Ddocs=enabled"
|
"-Ddocs=enabled"
|
||||||
"-Dexamples=${mesonEnable withMediaSession}" # only needed for `pipewire-media-session`
|
|
||||||
"-Dudevrulesdir=lib/udev/rules.d"
|
"-Dudevrulesdir=lib/udev/rules.d"
|
||||||
"-Dinstalled_tests=enabled"
|
"-Dinstalled_tests=enabled"
|
||||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||||
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
|
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
|
||||||
"-Dmedia-session-prefix=${placeholder "mediaSession"}"
|
|
||||||
"-Dlibjack-path=${placeholder "jack"}/lib"
|
"-Dlibjack-path=${placeholder "jack"}/lib"
|
||||||
"-Dlibcamera=disabled"
|
"-Dlibcamera=disabled"
|
||||||
"-Droc=disabled"
|
"-Droc=disabled"
|
||||||
|
@ -148,7 +154,8 @@ let
|
||||||
"-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}"
|
"-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}"
|
||||||
"-Dsysconfdir=/etc"
|
"-Dsysconfdir=/etc"
|
||||||
"-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
|
"-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
|
||||||
"-Dsession-managers=${mesonList (lib.optional withMediaSession "media-session")}"
|
"-Dsession-managers="
|
||||||
|
"-Dvulkan=enabled"
|
||||||
];
|
];
|
||||||
|
|
||||||
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
|
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
|
||||||
|
@ -157,29 +164,20 @@ let
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
patchShebangs source/doc/strip-static.sh
|
patchShebangs source/doc/strip-static.sh
|
||||||
|
patchShebangs source/doc/input-filter.sh
|
||||||
|
patchShebangs source/doc/input-filter-h.sh
|
||||||
patchShebangs source/spa/tests/gen-cpp-test.py
|
patchShebangs source/spa/tests/gen-cpp-test.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
pushd $lib/share
|
mkdir $out/nix-support
|
||||||
mkdir -p $out/nix-support/etc/pipewire
|
pushd $lib/share/pipewire
|
||||||
for f in pipewire/*.conf; do
|
for f in *.conf; do
|
||||||
echo "Generating JSON from $f"
|
echo "Generating JSON from $f"
|
||||||
$out/bin/spa-json-dump "$f" > "$out/nix-support/etc/$f.json"
|
$out/bin/spa-json-dump "$f" > "$out/nix-support/$f.json"
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p $mediaSession/nix-support/etc/pipewire/media-session.d
|
|
||||||
for f in pipewire/media-session.d/*.conf; do
|
|
||||||
echo "Generating JSON from $f"
|
|
||||||
$out/bin/spa-json-dump "$f" > "$mediaSession/nix-support/etc/$f.json"
|
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
moveToOutput "share/pipewire/media-session.d/*.conf" "$mediaSession"
|
|
||||||
moveToOutput "share/systemd/user/pipewire-media-session.*" "$mediaSession"
|
|
||||||
moveToOutput "lib/systemd/user/pipewire-media-session.*" "$mediaSession"
|
|
||||||
moveToOutput "bin/pipewire-media-session" "$mediaSession"
|
|
||||||
|
|
||||||
moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
|
moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
|
||||||
moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
|
moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
|
||||||
moveToOutput "bin/pipewire-pulse" "$pulse"
|
moveToOutput "bin/pipewire-pulse" "$pulse"
|
||||||
|
@ -191,21 +189,14 @@ let
|
||||||
installedTests = nixosTests.installed-tests.pipewire;
|
installedTests = nixosTests.installed-tests.pipewire;
|
||||||
|
|
||||||
# This ensures that all the paths used by the NixOS module are found.
|
# This ensures that all the paths used by the NixOS module are found.
|
||||||
test-paths = callPackage ./test-paths.nix {
|
test-paths = callPackage ./test-paths.nix { package = self; } {
|
||||||
paths-out = [
|
paths-out = [
|
||||||
"share/alsa/alsa.conf.d/50-pipewire.conf"
|
"share/alsa/alsa.conf.d/50-pipewire.conf"
|
||||||
"nix-support/etc/pipewire/client-rt.conf.json"
|
"nix-support/client-rt.conf.json"
|
||||||
"nix-support/etc/pipewire/client.conf.json"
|
"nix-support/client.conf.json"
|
||||||
"nix-support/etc/pipewire/jack.conf.json"
|
"nix-support/jack.conf.json"
|
||||||
"nix-support/etc/pipewire/pipewire.conf.json"
|
"nix-support/pipewire.conf.json"
|
||||||
"nix-support/etc/pipewire/pipewire-pulse.conf.json"
|
"nix-support/pipewire-pulse.conf.json"
|
||||||
];
|
|
||||||
paths-out-media-session = [
|
|
||||||
"nix-support/etc/pipewire/media-session.d/alsa-monitor.conf.json"
|
|
||||||
"nix-support/etc/pipewire/media-session.d/bluez-monitor.conf.json"
|
|
||||||
"nix-support/etc/pipewire/media-session.d/bluez-hardware.conf.json"
|
|
||||||
"nix-support/etc/pipewire/media-session.d/media-session.conf.json"
|
|
||||||
"nix-support/etc/pipewire/media-session.d/v4l2-monitor.conf.json"
|
|
||||||
];
|
];
|
||||||
paths-lib = [
|
paths-lib = [
|
||||||
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
|
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitLab
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
|
, pkg-config
|
||||||
|
, doxygen
|
||||||
|
, graphviz
|
||||||
|
, systemd
|
||||||
|
, pipewire
|
||||||
|
, glib
|
||||||
|
, dbus
|
||||||
|
, alsa-lib
|
||||||
|
, callPackage
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
mesonEnable = b: if b then "enabled" else "disabled";
|
||||||
|
mesonList = l: "[" + lib.concatStringsSep "," l + "]";
|
||||||
|
|
||||||
|
self = stdenv.mkDerivation rec {
|
||||||
|
pname = "pipewire-media-session";
|
||||||
|
version = "0.4.0";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
domain = "gitlab.freedesktop.org";
|
||||||
|
owner = "pipewire";
|
||||||
|
repo = "media-session";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-zhOvBlG7DuQkJ+ZZBhBhfKwk+bbLljpt3w4JlK3cJLk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
doxygen
|
||||||
|
graphviz
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
alsa-lib
|
||||||
|
dbus
|
||||||
|
glib
|
||||||
|
pipewire
|
||||||
|
systemd
|
||||||
|
];
|
||||||
|
|
||||||
|
mesonFlags = [
|
||||||
|
"-Ddocs=enabled"
|
||||||
|
# We generate these empty files from the nixos module, don't bother installing them
|
||||||
|
"-Dwith-module-sets=[]"
|
||||||
|
];
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
patchShebangs source/doc/input-filter-h.sh
|
||||||
|
patchShebangs source/doc/input-filter.sh
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir $out/nix-support
|
||||||
|
cd $out/share/pipewire/media-session.d
|
||||||
|
for f in *.conf; do
|
||||||
|
echo "Generating JSON from $f"
|
||||||
|
${pipewire}/bin/spa-json-dump "$f" > "$out/nix-support/$f.json"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests = {
|
||||||
|
test-paths = callPackage ./test-paths.nix { package = self; } {
|
||||||
|
paths-out = [
|
||||||
|
"nix-support/alsa-monitor.conf.json"
|
||||||
|
"nix-support/bluez-monitor.conf.json"
|
||||||
|
"nix-support/media-session.conf.json"
|
||||||
|
"nix-support/v4l2-monitor.conf.json"
|
||||||
|
];
|
||||||
|
paths-lib = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Example session manager for PipeWire";
|
||||||
|
homepage = "https://pipewire.org";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ jtojnar kranzes ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
self
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, runCommand, pipewire, paths-out, paths-lib, paths-out-media-session }:
|
{ lib, runCommand, package, paths-out, paths-lib }:
|
||||||
|
|
||||||
let
|
let
|
||||||
check-path = output: path: ''
|
check-path = output: path: ''
|
||||||
|
@ -14,9 +14,8 @@ let
|
||||||
in runCommand "pipewire-test-paths" { } ''
|
in runCommand "pipewire-test-paths" { } ''
|
||||||
touch $out
|
touch $out
|
||||||
|
|
||||||
${check-output pipewire.mediaSession paths-out-media-session}
|
${check-output package.lib paths-lib}
|
||||||
${check-output pipewire.lib paths-lib}
|
${check-output package paths-out}
|
||||||
${check-output pipewire paths-out}
|
|
||||||
|
|
||||||
if [[ -n "$error" ]]; then
|
if [[ -n "$error" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -11,14 +11,27 @@ NIXPKGS_ROOT="$(git rev-parse --show-toplevel)"
|
||||||
|
|
||||||
cd "$NIXPKGS_ROOT"
|
cd "$NIXPKGS_ROOT"
|
||||||
nix-update pipewire
|
nix-update pipewire
|
||||||
outputs=$(nix-build . -A pipewire -A pipewire.mediaSession)
|
outputs=$(nix-build . -A pipewire)
|
||||||
for p in $outputs; do
|
for p in $outputs; do
|
||||||
conf_files=$(find "$p/nix-support/etc/pipewire/" -name '*.conf.json')
|
conf_files=$(find "$p/nix-support/" -name '*.conf.json')
|
||||||
for c in $conf_files; do
|
for c in $conf_files; do
|
||||||
file_name=$(basename "$c")
|
file_name=$(basename "$c")
|
||||||
if [[ ! -e "nixos/modules/services/desktops/pipewire/$file_name" ]]; then
|
if [[ ! -e "nixos/modules/services/desktops/pipewire/daemon/$file_name" ]]; then
|
||||||
echo "New file $file_name found! Add it to the module config and passthru tests!"
|
echo "New file $file_name found! Add it to the module config and passthru tests!"
|
||||||
fi
|
fi
|
||||||
install -m 0644 "$c" "nixos/modules/services/desktops/pipewire/"
|
install -m 0644 "$c" "nixos/modules/services/desktops/pipewire/daemon/"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
nix-update pipewire-media-session
|
||||||
|
outputs=$(nix-build . -A pipewire-media-session)
|
||||||
|
for p in $outputs; do
|
||||||
|
conf_files=$(find "$p/nix-support/" -name '*.conf.json')
|
||||||
|
for c in $conf_files; do
|
||||||
|
file_name=$(basename "$c")
|
||||||
|
if [[ ! -e "nixos/modules/services/desktops/pipewire/media-session/$file_name" ]]; then
|
||||||
|
echo "New file $file_name found! Add it to the module config and passthru tests!"
|
||||||
|
fi
|
||||||
|
install -m 0644 "$c" "nixos/modules/services/desktops/pipewire/media-session/"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
|
@ -12385,6 +12385,7 @@ in
|
||||||
pipenv = callPackage ../development/tools/pipenv {};
|
pipenv = callPackage ../development/tools/pipenv {};
|
||||||
|
|
||||||
pipewire = callPackage ../development/libraries/pipewire {};
|
pipewire = callPackage ../development/libraries/pipewire {};
|
||||||
|
pipewire-media-session = callPackage ../development/libraries/pipewire/media-session.nix {};
|
||||||
pipewire_0_2 = callPackage ../development/libraries/pipewire/0.2.nix {};
|
pipewire_0_2 = callPackage ../development/libraries/pipewire/0.2.nix {};
|
||||||
|
|
||||||
pyradio = callPackage ../applications/radio/pyradio {};
|
pyradio = callPackage ../applications/radio/pyradio {};
|
||||||
|
|
Loading…
Reference in New Issue