cross: cleanup blueprint-compiler patches even more

it would *seem* that the only actual issue is the compiler itself not having GIR files *it* needs

however moby is being extremely slow to deploy so i havent verified this wholly
This commit is contained in:
2025-04-20 20:52:23 +00:00
parent 35539ca2ec
commit fbde8816e9

View File

@@ -94,30 +94,35 @@ let
# wrapProgram $out/bin/blueprint-compiler --set GI_TYPELIB_PATH ${typelibPath typelibs}
# '';
# });
wrapBlueprint = typelibs: final.buildPackages.writeShellScriptBin "blueprint-compiler" ''
export GI_TYPELIB_PATH=${typelibPath typelibs}
exec ${lib.getExe final.buildPackages.blueprint-compiler} "$@"
'';
# wrapBlueprint = typelibs: final.buildPackages.writeShellScriptBin "blueprint-compiler" ''
# export GI_TYPELIB_PATH=${typelibPath typelibs}
# exec ${lib.getExe final.buildPackages.blueprint-compiler} "$@"
# '';
# use like: `p.override { blueprint-compiler = crossBlueprint; }`
crossBlueprint = final.pkgsBuildBuild.blueprint-compiler.overrideAttrs (upstream: {
# blueprint-compiler isn't invokable in a standalone environment.
# i.e. `blueprint-compiler --help` fails.
# fix by adding glib typelib.
# TODO: upstream! (see `wip-blueprint-compiler` nixpkgs branch)
crossBlueprint = final.buildPackages.blueprint-compiler.overrideAttrs (upstream: {
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
final.pkgsBuildBuild.makeWrapper
final.buildPackages.buildPackages.wrapGAppsNoGuiHook
];
postFixup = (upstream.postFixup or "") + ''
wrapProgram $out/bin/blueprint-compiler \
--prefix GI_TYPELIB_PATH : "${lib.getLib final.pkgsBuildBuild.glib}/lib/girepository-1.0:${lib.getLib final.pkgsBuildBuild.gobject-introspection}/lib/girepository-1.0"
'';
# propagate gobject-introspection such that it appears in the same host offset as us,
# and populates GI_TYPELIB_PATH with the correct offset.
propagatedBuildInputs = [];
depsTargetTargetPropagated = [ final.gobject-introspection ];
});
# crossBlueprint = final.pkgsBuildBuild.blueprint-compiler.overrideAttrs (upstream: {
# # blueprint-compiler isn't invokable in a standalone environment.
# # i.e. `blueprint-compiler --help` fails.
# # fix by adding glib typelib.
# # TODO: upstream! (see `wip-blueprint-compiler` nixpkgs branch)
# nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
# final.pkgsBuildBuild.makeWrapper
# ];
# postFixup = (upstream.postFixup or "") + ''
# wrapProgram $out/bin/blueprint-compiler \
# --prefix GI_TYPELIB_PATH : "${lib.getLib final.pkgsBuildBuild.glib}/lib/girepository-1.0:${lib.getLib final.pkgsBuildBuild.gobject-introspection}/lib/girepository-1.0"
# '';
# # propagate gobject-introspection such that it appears in the same host offset as us,
# # and populates GI_TYPELIB_PATH with the correct offset.
# propagatedBuildInputs = [];
# depsTargetTargetPropagated = [ final.gobject-introspection ];
# });
# build a blueprint-based package in a way that is cross-compatible
# fixBlueprint = p: mvToDepsBuildBuild [ crossBlueprint ] p;