Merge pull request #108174 from flokli/cross-compile-pulseaudio

pulseaudio: fix cross-compilation
This commit is contained in:
John Ericson 2021-01-01 18:26:16 -05:00 committed by GitHub
commit 040d7580a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -15,13 +15,14 @@ stdenv.mkDerivation rec {
buildInputs =
[ alsaLib libogg ]
++ lib.optional (libpulseaudio != null) libpulseaudio
++ lib.optional (libjack2 != null) libjack2;
# https://github.com/NixOS/nixpkgs/issues/96548
++ lib.optional (libjack2 != null && (stdenv.buildPlatform == stdenv.hostPlatform)) libjack2;
meta = with lib; {
description = "Various plugins for ALSA";
homepage = "http://alsa-project.org/";
license = licenses.lgpl21;
maintainers = [maintainers.marcweber];
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux;
};
}

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"