Skip to content

Commit db4be47

Browse files
flatpak: fix cross compilation (#337412)
2 parents 45ab79d + 09a2976 commit db4be47

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pkgs/by-name/fl/flatpak/package.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
autoreconfHook,
88
bison,
99
bubblewrap,
10+
buildPackages,
1011
bzip2,
1112
coreutils,
1213
curl,
@@ -40,6 +41,7 @@
4041
p11-kit,
4142
pkg-config,
4243
polkit,
44+
pkgsCross,
4345
python3,
4446
shared-mime-info,
4547
socat,
@@ -205,8 +207,12 @@ stdenv.mkDerivation (finalAttrs: {
205207
PATH=${lib.makeBinPath [ vsc-py ]}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler
206208
207209
substituteInPlace configure.ac \
208-
--replace-fail '$BWRAP --version' 'echo ${bubblewrap.version}' \
209-
--replace-fail '$DBUS_PROXY --version' 'echo ${xdg-dbus-proxy.version}'
210+
--replace-fail '$BWRAP --' ${
211+
lib.escapeShellArg (stdenv.hostPlatform.emulator buildPackages + " $BWRAP --")
212+
} \
213+
--replace-fail '$DBUS_PROXY --' ${
214+
lib.escapeShellArg (stdenv.hostPlatform.emulator buildPackages + " $DBUS_PROXY --")
215+
}
210216
'';
211217

212218
passthru = {
@@ -218,6 +224,8 @@ stdenv.mkDerivation (finalAttrs: {
218224
updateScript = nix-update-script { };
219225

220226
tests = {
227+
cross = pkgsCross.aarch64-multiplatform.flatpak;
228+
221229
installedTests = nixosTests.installed-tests.flatpak;
222230

223231
validate-icon = runCommand "test-icon-validation" { } ''

0 commit comments

Comments
 (0)