pulseaudio: fix cross compilation by disabling gsettings when cross-compiling

When cross-compiling, pulseaudio seems to not find some m4 macro
providing GSETTINGS_RULES.

However, apart from the obviously missing gsettings support, this works
just fine.
This commit is contained in:
Florian Klink 2021-01-01 22:11:29 +01:00
parent 033cfcce15
commit 767252d232

View file

@ -93,7 +93,8 @@ stdenv.mkDerivation rec {
]
++ lib.optional (jackaudioSupport && !libOnly) "--enable-jack"
++ lib.optional stdenv.isDarwin "--with-mac-sysroot=/"
++ lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user";
++ lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--disable-gsettings";
enableParallelBuilding = true;
@ -118,7 +119,7 @@ stdenv.mkDerivation rec {
rm -f $out/bin/qpaeq # this is packaged by the "qpaeq" package now, because of missing deps
'';
preFixup = lib.optionalString stdenv.isLinux ''
preFixup = lib.optionalString (stdenv.isLinux && (stdenv.hostPlatform == stdenv.buildPlatform)) ''
wrapProgram $out/libexec/pulse/gsettings-helper \
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules"