From 767252d232503a56c64e6f71fbb7c9bb8e030be4 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 1 Jan 2021 22:11:29 +0100 Subject: [PATCH] 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. --- pkgs/servers/pulseaudio/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 70a964039fc..625e2e0e8ca 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -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"