buildFHSEnv: fix cross compilation (#361195)

This commit is contained in:
Philip Taron
2024-12-02 12:57:55 -08:00
committed by GitHub
2 changed files with 11 additions and 3 deletions
@@ -5,7 +5,7 @@
, writeText
, writeShellScriptBin
, pkgs
, pkgsi686Linux
, pkgsHostTarget
}:
{ profile ? ""
@@ -36,6 +36,10 @@
# /lib will link to /lib64
let
# The splicing code does not handle `pkgsi686Linux` well, so we have to be
# explicit about which package set it's coming from.
inherit (pkgsHostTarget) pkgsi686Linux;
name = if (args ? pname && args ? version)
then "${args.pname}-${args.version}"
else args.name;
@@ -212,7 +216,7 @@ let
ln -fsr $d/glib-2.0/schemas/*.xml $out/usr/share/glib-2.0/schemas
ln -fsr $d/glib-2.0/schemas/*.gschema.override $out/usr/share/glib-2.0/schemas
done
${pkgs.glib.dev}/bin/glib-compile-schemas $out/usr/share/glib-2.0/schemas
${pkgs.pkgsBuildBuild.glib.dev}/bin/glib-compile-schemas $out/usr/share/glib-2.0/schemas
fi
${extraBuildCommands}
@@ -4,7 +4,7 @@
, runCommandLocal
, writeShellScript
, glibc
, pkgsi686Linux
, pkgsHostTarget
, runCommandCC
, coreutils
, bubblewrap
@@ -42,6 +42,10 @@ let
inherit (lib.attrsets) removeAttrs;
# The splicing code does not handle `pkgsi686Linux` well, so we have to be
# explicit about which package set it's coming from.
inherit (pkgsHostTarget) pkgsi686Linux;
name = args.name or "${args.pname}-${args.version}";
executableName = args.pname or args.name;
# we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal