From 09a29769d5fe08a73740c370d83a6856cc62002e Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 19 Aug 2024 23:29:30 +0000 Subject: [PATCH] flatpak: fix cross compilation, add cross check to passthru.tests The 1.14.8 -> 1.14.10 update broke cross compilation, because the upstream build script now invokes runtime dependencies for feature detection. It seems the package will be more robust against changes if we simply emulate these checks rather than attempt to patch them out individually. --- pkgs/by-name/fl/flatpak/package.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fl/flatpak/package.nix b/pkgs/by-name/fl/flatpak/package.nix index 96349cfcd784..34cb1059b4f4 100644 --- a/pkgs/by-name/fl/flatpak/package.nix +++ b/pkgs/by-name/fl/flatpak/package.nix @@ -7,6 +7,7 @@ autoreconfHook, bison, bubblewrap, + buildPackages, bzip2, coreutils, curl, @@ -40,6 +41,7 @@ p11-kit, pkg-config, polkit, + pkgsCross, python3, shared-mime-info, socat, @@ -205,8 +207,12 @@ stdenv.mkDerivation (finalAttrs: { PATH=${lib.makeBinPath [ vsc-py ]}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler substituteInPlace configure.ac \ - --replace-fail '$BWRAP --version' 'echo ${bubblewrap.version}' \ - --replace-fail '$DBUS_PROXY --version' 'echo ${xdg-dbus-proxy.version}' + --replace-fail '$BWRAP --' ${ + lib.escapeShellArg (stdenv.hostPlatform.emulator buildPackages + " $BWRAP --") + } \ + --replace-fail '$DBUS_PROXY --' ${ + lib.escapeShellArg (stdenv.hostPlatform.emulator buildPackages + " $DBUS_PROXY --") + } ''; passthru = { @@ -218,6 +224,8 @@ stdenv.mkDerivation (finalAttrs: { updateScript = nix-update-script { }; tests = { + cross = pkgsCross.aarch64-multiplatform.flatpak; + installedTests = nixosTests.installed-tests.flatpak; validate-icon = runCommand "test-icon-validation" { } ''