Merge pull request #104553 from jansol/pipewire
pipewire: 0.3.15 -> 0.3.16
This commit is contained in:
commit
e95cc8519b
@ -17,10 +17,6 @@ let
|
|||||||
mkdir -p "$out/lib"
|
mkdir -p "$out/lib"
|
||||||
ln -s "${pkgs.pipewire.jack}/lib" "$out/lib/pipewire"
|
ln -s "${pkgs.pipewire.jack}/lib" "$out/lib/pipewire"
|
||||||
'';
|
'';
|
||||||
pulse-libs = pkgs.runCommand "pulse-libs" {} ''
|
|
||||||
mkdir -p "$out/lib"
|
|
||||||
ln -s "${pkgs.pipewire.pulse}/lib" "$out/lib/pipewire"
|
|
||||||
'';
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -50,7 +46,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pulse = {
|
pulse = {
|
||||||
enable = mkEnableOption "PulseAudio emulation";
|
enable = mkEnableOption "PulseAudio server emulation";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -61,23 +57,24 @@ in {
|
|||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable;
|
assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable;
|
||||||
message = "PipeWire based PulseAudio emulation doesn't use the PulseAudio service";
|
message = "PipeWire based PulseAudio server emulation replaces PulseAudio";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
|
assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
|
||||||
message = "PIpeWire based JACK emulation doesn't use the JACK service";
|
message = "PipeWire based JACK emulation doesn't use the JACK service";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.pipewire ]
|
environment.systemPackages = [ pkgs.pipewire ]
|
||||||
++ lib.optional cfg.jack.enable jack-libs
|
++ lib.optional cfg.jack.enable jack-libs;
|
||||||
++ lib.optional cfg.pulse.enable pulse-libs;
|
|
||||||
|
|
||||||
systemd.packages = [ pkgs.pipewire ];
|
systemd.packages = [ pkgs.pipewire ]
|
||||||
|
++ lib.optional cfg.pulse.enable pkgs.pipewire.pulse;
|
||||||
|
|
||||||
# PipeWire depends on DBUS but doesn't list it. Without this booting
|
# PipeWire depends on DBUS but doesn't list it. Without this booting
|
||||||
# into a terminal results in the service crashing with an error.
|
# into a terminal results in the service crashing with an error.
|
||||||
systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
|
systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
|
||||||
|
systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf (cfg.socketActivation && cfg.pulse.enable) ["sockets.target"];
|
||||||
systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
|
systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
|
||||||
services.udev.packages = [ pkgs.pipewire ];
|
services.udev.packages = [ pkgs.pipewire ];
|
||||||
|
|
||||||
@ -100,6 +97,6 @@ in {
|
|||||||
source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf";
|
source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf";
|
||||||
};
|
};
|
||||||
environment.sessionVariables.LD_LIBRARY_PATH =
|
environment.sessionVariables.LD_LIBRARY_PATH =
|
||||||
lib.optional (cfg.jack.enable || cfg.pulse.enable) "/run/current-system/sw/lib/pipewire";
|
lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
, libsndfile
|
, libsndfile
|
||||||
, vulkan-headers
|
, vulkan-headers
|
||||||
, vulkan-loader
|
, vulkan-loader
|
||||||
, libpulseaudio
|
|
||||||
, makeFontsConf
|
, makeFontsConf
|
||||||
, callPackage
|
, callPackage
|
||||||
, nixosTests
|
, nixosTests
|
||||||
@ -40,7 +39,7 @@ let
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "pipewire";
|
pname = "pipewire";
|
||||||
version = "0.3.15";
|
version = "0.3.16";
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
@ -57,7 +56,7 @@ stdenv.mkDerivation rec {
|
|||||||
owner = "pipewire";
|
owner = "pipewire";
|
||||||
repo = "pipewire";
|
repo = "pipewire";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1lmsn13pbr0cigb5ri9nd3102ffbaf8nsz5c8aawf6lsz7mhkx9x";
|
sha256 = "0ivfx3rbg2iwjdh412zjpk9y5mzw7zh6asv4sji8lq0dzhwbz1qc";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -65,11 +64,8 @@ stdenv.mkDerivation rec {
|
|||||||
./alsa-profiles-use-libdir.patch
|
./alsa-profiles-use-libdir.patch
|
||||||
# Move installed tests into their own output.
|
# Move installed tests into their own output.
|
||||||
./installed-tests-path.patch
|
./installed-tests-path.patch
|
||||||
# Fix older clients (e.g. Chrome/Chromium):
|
# Change the path of the pipewire-pulse binary in the service definition.
|
||||||
(fetchpatch { # protocol-native: do version check on HELLO
|
./pipewire-pulse-path.patch
|
||||||
url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/b8c7b36d3b8be16593f554964cf2f852c21b5c2c.patch";
|
|
||||||
sha256 = "18461grisrgqbad6bfa1bm17mslddgfmjfprc9vjvab2mmpsjss9";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -78,7 +74,6 @@ stdenv.mkDerivation rec {
|
|||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkgconfig
|
pkgconfig
|
||||||
removeReferencesTo
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -86,7 +81,6 @@ stdenv.mkDerivation rec {
|
|||||||
dbus
|
dbus
|
||||||
glib
|
glib
|
||||||
libjack2
|
libjack2
|
||||||
libpulseaudio
|
|
||||||
libsndfile
|
libsndfile
|
||||||
udev
|
udev
|
||||||
vulkan-headers
|
vulkan-headers
|
||||||
@ -104,7 +98,7 @@ stdenv.mkDerivation rec {
|
|||||||
"-Dudevrulesdir=lib/udev/rules.d"
|
"-Dudevrulesdir=lib/udev/rules.d"
|
||||||
"-Dinstalled_tests=true"
|
"-Dinstalled_tests=true"
|
||||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||||
"-Dlibpulse-path=${placeholder "pulse"}/lib"
|
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
|
||||||
"-Dlibjack-path=${placeholder "jack"}/lib"
|
"-Dlibjack-path=${placeholder "jack"}/lib"
|
||||||
"-Dgstreamer=${mesonBool gstreamerSupport}"
|
"-Dgstreamer=${mesonBool gstreamerSupport}"
|
||||||
"-Dffmpeg=${mesonBool ffmpegSupport}"
|
"-Dffmpeg=${mesonBool ffmpegSupport}"
|
||||||
@ -118,10 +112,10 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
# Pulseaudio asserts lead to dev references.
|
postInstall = ''
|
||||||
# TODO This should be fixed in the pulseaudio sources instead.
|
moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
|
||||||
preFixup = ''
|
moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
|
||||||
remove-references-to -t ${libpulseaudio.dev} "$(readlink -f $pulse/lib/libpulse.so)"
|
moveToOutput "bin/pipewire-pulse" "$pulse"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index 4b9e46b8..9d73ed06 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -147,3 +147,6 @@ option('pw-cat',
|
||||||
|
option('udevrulesdir',
|
||||||
|
type : 'string',
|
||||||
|
description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
|
||||||
|
+option('pipewire_pulse_prefix',
|
||||||
|
+ type : 'string',
|
||||||
|
+ description : 'Install directory for the pipewire-pulse daemon')
|
||||||
|
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
|
||||||
|
index 29fc93d4..f78946f2 100644
|
||||||
|
--- a/src/daemon/systemd/user/meson.build
|
||||||
|
+++ b/src/daemon/systemd/user/meson.build
|
||||||
|
@@ -6,7 +6,7 @@ install_data(
|
||||||
|
|
||||||
|
systemd_config = configuration_data()
|
||||||
|
systemd_config.set('PW_BINARY', join_paths(pipewire_bindir, 'pipewire'))
|
||||||
|
-systemd_config.set('PW_PULSE_BINARY', join_paths(pipewire_bindir, 'pipewire-pulse'))
|
||||||
|
+systemd_config.set('PW_PULSE_BINARY', join_paths(get_option('pipewire_pulse_prefix'), 'bin/pipewire-pulse'))
|
||||||
|
|
||||||
|
configure_file(input : 'pipewire.service.in',
|
||||||
|
output : 'pipewire.service',
|
Loading…
Reference in New Issue
Block a user