From 2f08d9917d9a555775fc7bd112a87647d9ca08c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Prezelin?= Date: Fri, 24 Jul 2026 17:16:49 +0200 Subject: [PATCH] rtk: fix build with Rust 1.97 Rust 1.97 exposes dead code while compiling rtk 0.43.0's test target, and upstream promotes warnings to errors. Cap lints until a release includes the develop-branch fix from https://github.com/rtk-ai/rtk/commit/73b8cb3069297374a3de58552b9fe4aa2cda3a41. --- pkgs/by-name/rt/rtk/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/rt/rtk/package.nix b/pkgs/by-name/rt/rtk/package.nix index 2286c9a334d8..187af33367f7 100644 --- a/pkgs/by-name/rt/rtk/package.nix +++ b/pkgs/by-name/rt/rtk/package.nix @@ -24,6 +24,12 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-XKUKdhxfnwUCOx9slqx4oUFa09HcosPLVh5Xkh87oSk="; + # Rust 1.97's dead_code_pub_in_binary analysis exposes dead code in test builds. + # Fixed upstream on develop after 0.43.0: + # https://github.com/rtk-ai/rtk/commit/73b8cb3069297374a3de58552b9fe4aa2cda3a41 + # TODO: Remove RUSTFLAGS when updating rtk to the next release. + env.RUSTFLAGS = "--cap-lints warn"; + nativeBuildInputs = [ makeWrapper pkg-config