fractal: fix cross compilation (#437038)

This commit is contained in:
Ben Siraphob
2025-10-01 05:18:16 +00:00
committed by GitHub
+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 { };
};