From dacc02faa541741c5ed11f6403ebf3fef0a54a32 Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sat, 8 Jun 2019 13:56:47 +0200 Subject: [PATCH] pulseaudio: Fix detection of ALSA UCM This one was a bit tricky to find because it only causes a runtime error, and pulseaudio has shims for most ALSA UCM methods except one. (I guess nobody ever really tests pulseaudio in combination with UCM-less ALSA?) ALSA 1.1.8 had ${alsa-dev}/include/alsa/ in the pkg-config file, which was considered wrong and fixed in 1.1.9. However, pulseaudio was relying on being able to include ALSA headers like and rather than and . (For asoundlib.h it only causes a warning, because the ALSA guys created a shim for that header.) These two patches change pulseaudio to use the correct include directives. --- pkgs/servers/pulseaudio/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index a913643df08..06693303ff9 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkgconfig, intltool, autoreconfHook +{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook , libsndfile, libtool, makeWrapper , xorg, libcap, alsaLib, glib, gnome3 , avahi, libjack2, libasyncns, lirc, dbus @@ -117,6 +117,19 @@ stdenv.mkDerivation rec { --prefix GIO_EXTRA_MODULES : "${lib.getLib gnome3.dconf}/lib/gio/modules" ''; + patches = [ + (fetchpatch { + name = "alsa-asoundlib-include.patch"; + url = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/993d3fd89e5611997f1e165bf03edefb0204b0a4.patch"; + sha256 = "17icnf8026947j1dqw4k16f91vy6zyg7q41zv2j6pxh9fncb1s71"; + }) + (fetchpatch { + name = "alsa-use-case-include.patch"; + url = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/b89d33bb182c42db5ad3987b0e91b7bf62f421e8.patch"; + sha256 = "0jccpc0dgkb0v4xrkyca2pm2k4i6pvahs9bq4hbg34173p23g5nb"; + }) + ]; + meta = { description = "Sound server for POSIX and Win32 systems"; homepage = http://www.pulseaudio.org/;