fractal: fix cross compilation

This commit is contained in:
Colin
2025-08-26 06:59:03 +00:00
parent a24eb470cc
commit c8281b8783
+8
View File
@@ -52,6 +52,12 @@ stdenv.mkDerivation (finalAttrs: {
./disable-debug.patch
];
postPatch = ''
substituteInPlace src/meson.build --replace-fail \
"'src' / rust_target / meson.project_name()" \
"'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()"
'';
# Dirty approach to add patches after cargoSetupPostUnpackHook
# We should eventually use a cargo vendor patch hook instead
preConfigure = ''
@@ -104,6 +110,8 @@ stdenv.mkDerivation (finalAttrs: {
)
'';
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
passthru = {
updateScript = nix-update-script { };
};