spot: fix cross compilation (#437722)

This commit is contained in:
Seth Flynn
2025-08-28 17:33:04 -04:00
committed by GitHub
+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 { };
};