mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-01 00:12:39 +03:00
Merge pull request #116811 from jansol/pipewire
pipewire: 0.3.23 -> 0.3.24
This commit is contained in:
commit
9334a29720
6
nixos/modules/services/desktops/pipewire/README.md
Normal file
6
nixos/modules/services/desktops/pipewire/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Updating
|
||||
|
||||
1. Update the version & hash in pkgs/development/libraries/pipewire/default.nix
|
||||
2. run `nix build -f /path/to/nixpkgs/checkout pipewire pipewire.mediaSession`
|
||||
3. copy all JSON files from result/etc/pipewire and result-mediaSession/etc/pipewire/media-session.d to this directory
|
||||
4. add new files to the module config and passthru tests
|
@ -6,21 +6,34 @@
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": {
|
||||
"libpipewire-module-rtkit": {
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
"libpipewire-module-protocol-native": null,
|
||||
"libpipewire-module-client-node": null,
|
||||
"libpipewire-module-client-device": null,
|
||||
"libpipewire-module-adapter": null,
|
||||
"libpipewire-module-metadata": null,
|
||||
"libpipewire-module-session-manager": null
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"filter.properties": {},
|
||||
"stream.properties": {}
|
||||
}
|
||||
|
@ -6,14 +6,26 @@
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": {
|
||||
"libpipewire-module-protocol-native": null,
|
||||
"libpipewire-module-client-node": null,
|
||||
"libpipewire-module-client-device": null,
|
||||
"libpipewire-module-adapter": null,
|
||||
"libpipewire-module-metadata": null,
|
||||
"libpipewire-module-session-manager": null
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"filter.properties": {},
|
||||
"stream.properties": {}
|
||||
}
|
||||
|
@ -5,17 +5,24 @@
|
||||
"context.spa-libs": {
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": {
|
||||
"libpipewire-module-rtkit": {
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
"libpipewire-module-protocol-native": null,
|
||||
"libpipewire-module-client-node": null,
|
||||
"libpipewire-module-metadata": null
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
}
|
||||
],
|
||||
"jack.properties": {}
|
||||
}
|
||||
|
@ -6,21 +6,34 @@
|
||||
"api.v4l2.*": "v4l2/libspa-v4l2",
|
||||
"api.libcamera.*": "libcamera/libspa-libcamera"
|
||||
},
|
||||
"context.modules": {
|
||||
"libpipewire-module-rtkit": {
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
"libpipewire-module-protocol-native": null,
|
||||
"libpipewire-module-client-node": null,
|
||||
"libpipewire-module-client-device": null,
|
||||
"libpipewire-module-adapter": null,
|
||||
"libpipewire-module-metadata": null,
|
||||
"libpipewire-module-session-manager": null
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"session.modules": {
|
||||
"default": [
|
||||
"flatpak",
|
||||
|
@ -9,21 +9,12 @@ let
|
||||
&& pkgs.stdenv.isx86_64
|
||||
&& pkgs.pkgsi686Linux.pipewire != null;
|
||||
|
||||
prioritizeNativeProtocol = {
|
||||
"context.modules" = {
|
||||
"libpipewire-module-protocol-native" = {
|
||||
_priority = -100;
|
||||
_content = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Use upstream config files passed through spa-json-dump as the base
|
||||
# Patched here as necessary for them to work with this module
|
||||
defaults = {
|
||||
alsa-monitor = (builtins.fromJSON (builtins.readFile ./alsa-monitor.conf.json));
|
||||
bluez-monitor = (builtins.fromJSON (builtins.readFile ./bluez-monitor.conf.json));
|
||||
media-session = recursiveUpdate (builtins.fromJSON (builtins.readFile ./media-session.conf.json)) prioritizeNativeProtocol;
|
||||
media-session = (builtins.fromJSON (builtins.readFile ./media-session.conf.json));
|
||||
v4l2-monitor = (builtins.fromJSON (builtins.readFile ./v4l2-monitor.conf.json));
|
||||
};
|
||||
# Helpers for generating the pipewire JSON config file
|
||||
|
@ -4,25 +4,35 @@
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": {
|
||||
"libpipewire-module-rtkit": {
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
"libpipewire-module-protocol-native": null,
|
||||
"libpipewire-module-client-node": null,
|
||||
"libpipewire-module-adapter": null,
|
||||
"libpipewire-module-metadata": null,
|
||||
"libpipewire-module-protocol-pulse": {
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-pulse",
|
||||
"args": {
|
||||
"server.address": [
|
||||
"unix:native"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
"stream.properties": {}
|
||||
}
|
||||
|
@ -14,42 +14,66 @@
|
||||
"api.jack.*": "jack/libspa-jack",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": {
|
||||
"libpipewire-module-rtkit": {
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
"libpipewire-module-protocol-native": null,
|
||||
"libpipewire-module-profiler": null,
|
||||
"libpipewire-module-metadata": null,
|
||||
"libpipewire-module-spa-device-factory": null,
|
||||
"libpipewire-module-spa-node-factory": null,
|
||||
"libpipewire-module-client-node": null,
|
||||
"libpipewire-module-client-device": null,
|
||||
"libpipewire-module-portal": {
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-profiler"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-spa-device-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-spa-node-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-portal",
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
"libpipewire-module-access": {
|
||||
{
|
||||
"name": "libpipewire-module-access",
|
||||
"args": {}
|
||||
},
|
||||
"libpipewire-module-adapter": null,
|
||||
"libpipewire-module-link-factory": null,
|
||||
"libpipewire-module-session-manager": null
|
||||
},
|
||||
"context.objects": {
|
||||
"spa-node-factory": {
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-link-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"context.objects": [
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Dummy-Driver",
|
||||
"priority.driver": 8000
|
||||
}
|
||||
}
|
||||
},
|
||||
"context.exec": {}
|
||||
],
|
||||
"context.exec": []
|
||||
}
|
||||
|
@ -18,45 +18,15 @@ let
|
||||
ln -s "${cfg.package.jack}/lib" "$out/lib/pipewire"
|
||||
'';
|
||||
|
||||
prioritizeNativeProtocol = {
|
||||
"context.modules" = {
|
||||
# Most other modules depend on this, so put it first
|
||||
"libpipewire-module-protocol-native" = {
|
||||
_priority = -100;
|
||||
_content = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fixDaemonModulePriorities = {
|
||||
"context.modules" = {
|
||||
# Most other modules depend on thism so put it first
|
||||
"libpipewire-module-protocol-native" = {
|
||||
_priority = -100;
|
||||
_content = null;
|
||||
};
|
||||
# Needs to be before libpipewire-module-access
|
||||
"libpipewire-module-portal" = {
|
||||
_priority = -50;
|
||||
_content = {
|
||||
flags = [
|
||||
"ifexists"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Use upstream config files passed through spa-json-dump as the base
|
||||
# Patched here as necessary for them to work with this module
|
||||
defaults = {
|
||||
client = recursiveUpdate (builtins.fromJSON (builtins.readFile ./client.conf.json)) prioritizeNativeProtocol;
|
||||
client-rt = recursiveUpdate (builtins.fromJSON (builtins.readFile ./client-rt.conf.json)) prioritizeNativeProtocol;
|
||||
jack = recursiveUpdate (builtins.fromJSON (builtins.readFile ./jack.conf.json)) prioritizeNativeProtocol;
|
||||
client = builtins.fromJSON (builtins.readFile ./client.conf.json);
|
||||
client-rt = builtins.fromJSON (builtins.readFile ./client-rt.conf.json);
|
||||
jack = builtins.fromJSON (builtins.readFile ./jack.conf.json);
|
||||
# Remove session manager invocation from the upstream generated file, it points to the wrong path
|
||||
pipewire = recursiveUpdate (builtins.fromJSON (builtins.readFile ./pipewire.conf.json)) fixDaemonModulePriorities;
|
||||
pipewire-pulse = recursiveUpdate (builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json)) prioritizeNativeProtocol;
|
||||
pipewire = builtins.fromJSON (builtins.readFile ./pipewire.conf.json);
|
||||
pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
||||
};
|
||||
|
||||
# Helpers for generating the pipewire JSON config file
|
||||
|
@ -1,19 +1,19 @@
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index a6c8af72..8e5c3d73 100644
|
||||
index e2a1e028..310029f2 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -10,6 +10,9 @@ option('media-session',
|
||||
description: 'Build and install pipewire-media-session',
|
||||
type: 'boolean',
|
||||
value: true)
|
||||
type: 'feature',
|
||||
value: 'auto')
|
||||
+option('media-session-prefix',
|
||||
+ description: 'Install directory for pipewire-media-session and its support files',
|
||||
+ type: 'string')
|
||||
option('man',
|
||||
description: 'Build manpages',
|
||||
type: 'boolean',
|
||||
type: 'feature',
|
||||
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
|
||||
index 4a70b0b0..84c9a19e 100644
|
||||
index 5c4d1af0..7296220f 100644
|
||||
--- a/src/daemon/systemd/user/meson.build
|
||||
+++ b/src/daemon/systemd/user/meson.build
|
||||
@@ -10,7 +10,7 @@ install_data(
|
||||
|
@ -1,29 +1,29 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index ffee41b4..bab6f019 100644
|
||||
index 97d4d939..b17358e5 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -318,8 +318,8 @@ alsa_dep = (get_option('pipewire-alsa')
|
||||
? dependency('alsa', version : '>=1.1.7')
|
||||
: dependency('', required: false))
|
||||
|
||||
@@ -353,8 +353,8 @@ libinotify_dep = (build_machine.system() == 'freebsd'
|
||||
|
||||
alsa_dep = dependency('alsa', version : '>=1.1.7', required: get_option('pipewire-alsa'))
|
||||
|
||||
-installed_tests_metadir = join_paths(pipewire_datadir, 'installed-tests', pipewire_name)
|
||||
-installed_tests_execdir = join_paths(pipewire_libexecdir, 'installed-tests', pipewire_name)
|
||||
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', pipewire_name)
|
||||
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', pipewire_name)
|
||||
installed_tests_enabled = get_option('installed_tests')
|
||||
installed_tests_enabled = not get_option('installed_tests').disabled()
|
||||
installed_tests_template = files('template.test.in')
|
||||
|
||||
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index f03033c3..32df6c53 100644
|
||||
index fba0d647..8c6106cd 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -18,6 +18,9 @@ option('installed_tests',
|
||||
@@ -26,6 +26,9 @@ option('installed_tests',
|
||||
description: 'Install manual and automated test executables',
|
||||
type: 'boolean',
|
||||
value: false)
|
||||
type: 'feature',
|
||||
value: 'disabled')
|
||||
+option('installed_test_prefix',
|
||||
+ description: 'Prefix for installed tests',
|
||||
+ type: 'string')
|
||||
option('gstreamer',
|
||||
description: 'Build GStreamer plugins',
|
||||
type: 'boolean',
|
||||
type: 'feature',
|
||||
|
@ -39,11 +39,11 @@ let
|
||||
fontDirectories = [];
|
||||
};
|
||||
|
||||
mesonBool = b: if b then "true" else "false";
|
||||
mesonEnable = b: if b then "enabled" else "disabled";
|
||||
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "pipewire";
|
||||
version = "0.3.23";
|
||||
version = "0.3.24";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@ -61,7 +61,7 @@ let
|
||||
owner = "pipewire";
|
||||
repo = "pipewire";
|
||||
rev = version;
|
||||
hash = "sha256:1HMUrE1NBmrdBRMKX3LRlXaCEH3wqP2jGtW8Rp9oyQA=";
|
||||
hash = "sha256:PcY20FTtUtJYAwCscEs+HfkdwDksYPFZIVTVORP1ooI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -103,22 +103,23 @@ let
|
||||
++ lib.optionals bluezSupport [ bluez libopenaptx ldacbt sbc fdk_aac ];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=true"
|
||||
"-Dman=false" # we don't have xmltoman
|
||||
"-Dexamples=${mesonBool withMediaSession}" # only needed for `pipewire-media-session`
|
||||
"-Ddocs=enabled"
|
||||
"-Dman=disabled" # we don't have xmltoman
|
||||
"-Dexamples=${mesonEnable withMediaSession}" # only needed for `pipewire-media-session`
|
||||
"-Dudevrulesdir=lib/udev/rules.d"
|
||||
"-Dinstalled_tests=true"
|
||||
"-Dinstalled_tests=enabled"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
|
||||
"-Dmedia-session-prefix=${placeholder "mediaSession"}"
|
||||
"-Dlibjack-path=${placeholder "jack"}/lib"
|
||||
"-Dgstreamer=${mesonBool gstreamerSupport}"
|
||||
"-Dffmpeg=${mesonBool ffmpegSupport}"
|
||||
"-Dbluez5=${mesonBool bluezSupport}"
|
||||
"-Dbluez5-backend-hsp-native=${mesonBool nativeHspSupport}"
|
||||
"-Dbluez5-backend-hfp-native=${mesonBool nativeHfpSupport}"
|
||||
"-Dbluez5-backend-ofono=${mesonBool ofonoSupport}"
|
||||
"-Dbluez5-backend-hsphfpd=${mesonBool hsphfpdSupport}"
|
||||
"-Dlibcamera=disabled"
|
||||
"-Dgstreamer=${mesonEnable gstreamerSupport}"
|
||||
"-Dffmpeg=${mesonEnable ffmpegSupport}"
|
||||
"-Dbluez5=${mesonEnable bluezSupport}"
|
||||
"-Dbluez5-backend-hsp-native=${mesonEnable nativeHspSupport}"
|
||||
"-Dbluez5-backend-hfp-native=${mesonEnable nativeHfpSupport}"
|
||||
"-Dbluez5-backend-ofono=${mesonEnable ofonoSupport}"
|
||||
"-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}"
|
||||
"-Dpipewire_config_dir=/etc/pipewire"
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user