Skip to content

Commit b43da9a

Browse files
authored
buildFHSEnv: fix cross compilation (#361195)
2 parents 56340f0 + 66d5895 commit b43da9a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
, writeText
66
, writeShellScriptBin
77
, pkgs
8-
, pkgsi686Linux
8+
, pkgsHostTarget
99
}:
1010

1111
{ profile ? ""
@@ -36,6 +36,10 @@
3636
# /lib will link to /lib64
3737

3838
let
39+
# The splicing code does not handle `pkgsi686Linux` well, so we have to be
40+
# explicit about which package set it's coming from.
41+
inherit (pkgsHostTarget) pkgsi686Linux;
42+
3943
name = if (args ? pname && args ? version)
4044
then "${args.pname}-${args.version}"
4145
else args.name;
@@ -212,7 +216,7 @@ let
212216
ln -fsr $d/glib-2.0/schemas/*.xml $out/usr/share/glib-2.0/schemas
213217
ln -fsr $d/glib-2.0/schemas/*.gschema.override $out/usr/share/glib-2.0/schemas
214218
done
215-
${pkgs.glib.dev}/bin/glib-compile-schemas $out/usr/share/glib-2.0/schemas
219+
${pkgs.pkgsBuildBuild.glib.dev}/bin/glib-compile-schemas $out/usr/share/glib-2.0/schemas
216220
fi
217221
218222
${extraBuildCommands}

pkgs/build-support/build-fhsenv-bubblewrap/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
, runCommandLocal
55
, writeShellScript
66
, glibc
7-
, pkgsi686Linux
7+
, pkgsHostTarget
88
, runCommandCC
99
, coreutils
1010
, bubblewrap
@@ -42,6 +42,10 @@ let
4242

4343
inherit (lib.attrsets) removeAttrs;
4444

45+
# The splicing code does not handle `pkgsi686Linux` well, so we have to be
46+
# explicit about which package set it's coming from.
47+
inherit (pkgsHostTarget) pkgsi686Linux;
48+
4549
name = args.name or "${args.pname}-${args.version}";
4650
executableName = args.pname or args.name;
4751
# we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal

0 commit comments

Comments
 (0)