From d082d776134f4b48a967dd36ed25f1ebb8d87a6f Mon Sep 17 00:00:00 2001 From: Colton Donnelly Date: Thu, 23 May 2024 15:24:59 +0000 Subject: [PATCH] rust: improve nightly module displayVersion --- pkgs/modules/rust/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/modules/rust/default.nix b/pkgs/modules/rust/default.nix index 1b0591e2..047af6ac 100644 --- a/pkgs/modules/rust/default.nix +++ b/pkgs/modules/rust/default.nix @@ -21,11 +21,14 @@ let pkgs.fenix.targets.wasm32-wasi.${fenix-channel-name}.rust-std pkgs.fenix.targets.wasm32-unknown-unknown.${fenix-channel-name}.rust-std ]; + + # TODO: fenix doesn't give the rustc stable version :( + displayVersion = if fenix-channel-name == "stable" then "stable" else channel.cargo.version; in { id = "rust-${rust-channel-name}"; name = "Rust Tools (${rust-channel-name})"; - displayVersion = rust-channel-name; + inherit displayVersion; description = '' Rust development tools. Includes Rust compiler, Cargo, Rust analyzer. '';