spot: fix cross compilation

This commit is contained in:
Colin
2025-08-27 01:12:45 +00:00
parent 76f51b55bc
commit 09558b2d4b
+9
View File
@@ -40,6 +40,12 @@ stdenv.mkDerivation rec {
hash = "sha256-731aD+yJkyrNMmYtgKYzXIAyLegDBzTT2XqZs5usXiI=";
};
postPatch = ''
substituteInPlace src/meson.build --replace-fail \
"cargo_output = 'src' / rust_target / meson.project_name()" \
"cargo_output = 'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()"
'';
nativeBuildInputs = [
appstream-glib
blueprint-compiler
@@ -71,6 +77,9 @@ stdenv.mkDerivation rec {
# https://github.com/xou816/spot/issues/313
mesonBuildType = "release";
# For https://github.com/xou816/spot/blob/21ee601f655caa4ca9cae1033a27459fe6289318/src/meson.build#L122
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
passthru = {
updateScript = nix-update-script { };
};