diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 5f078d2f6fcf..e32ef9bc1df6 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -6,6 +6,7 @@ , soxr, speexdsp, systemd, webrtc-audio-processing_1 , gst_all_1 , check, libintl, meson, ninja, m4, wrapGAppsHook +, fetchpatch2 , x11Support ? false @@ -48,6 +49,19 @@ stdenv.mkDerivation rec { # Install sysconfdir files inside of the nix store, # but use a conventional runtime sysconfdir outside the store ./add-option-for-installation-sysconfdir.patch + + # Fix crashes with some UCM devices + # See https://gitlab.archlinux.org/archlinux/packaging/packages/pulseaudio/-/issues/4 + (fetchpatch2 { + name = "alsa-ucm-Check-UCM-verb-before-working-with-device-status.patch"; + url = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch"; + hash = "sha256-WyEqCitrqic2n5nNHeVS10vvGy5IzwObPPXftZKy/A8="; + }) + (fetchpatch2 { + name = "alsa-ucm-Replace-port-device-UCM-context-assertion-with-an-error.patch"; + url = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch"; + hash = "sha256-fMJ3EYq56sHx+zTrG6osvI/QgnhqLvWiifZxrRLMvns="; + }) ]; outputs = [ "out" "dev" ];