From d4def5dc15865627795c351343117f82b1c6dd29 Mon Sep 17 00:00:00 2001 From: azban Date: Fri, 13 Mar 2026 12:00:14 -0600 Subject: [PATCH] komodo: temporary patch fix for build after rustc 1.9.2 There was a breaking change in rustc 1.9.2 which caused the komodo build to fail. Include that patch for now until it is in a release that can be updated --- pkgs/by-name/ko/komodo/package.nix | 5 ++ .../by-name/ko/komodo/rustc-1_9_2-fixes.patch | 52 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/by-name/ko/komodo/rustc-1_9_2-fixes.patch diff --git a/pkgs/by-name/ko/komodo/package.nix b/pkgs/by-name/ko/komodo/package.nix index f44c7147758c..19a21ebc968f 100644 --- a/pkgs/by-name/ko/komodo/package.nix +++ b/pkgs/by-name/ko/komodo/package.nix @@ -17,6 +17,11 @@ rustPlatform.buildRustPackage (finalAttrs: { hash = "sha256-dLBgdcrIp5QM2TVIa86qX7m1c5n+qOIQJtqJPGvIZ+0="; }; + # Temporary fix to get build to pass until https://github.com/moghtech/komodo/pull/1122 + patches = [ + ./rustc-1_9_2-fixes.patch + ]; + cargoHash = "sha256-jf/Jp28g3inGn5jQp3cACdhl//tbXTMc1vP1K3g/CyQ="; # disable for check. document generation is fail diff --git a/pkgs/by-name/ko/komodo/rustc-1_9_2-fixes.patch b/pkgs/by-name/ko/komodo/rustc-1_9_2-fixes.patch new file mode 100644 index 000000000000..4021c35ba17e --- /dev/null +++ b/pkgs/by-name/ko/komodo/rustc-1_9_2-fixes.patch @@ -0,0 +1,52 @@ +diff --git a/bin/core/src/alert/discord.rs b/bin/core/src/alert/discord.rs +index 427227d..6d19678 100644 +--- a/bin/core/src/alert/discord.rs ++++ b/bin/core/src/alert/discord.rs +@@ -230,14 +230,13 @@ pub async fn send_alert( + ) + } + AlertData::Custom { message, details } => { +- format!( +- "{level} | {message}{}", +- if details.is_empty() { +- format_args!("") +- } else { +- format_args!("\n{details}") +- } +- ) ++ let details_str = if details.is_empty() { ++ String::new() ++ } else { ++ format!("\n{details} f") ++ }; ++ ++ format!("{level} | {message}{details_str}") + } + AlertData::None {} => Default::default(), + }; +diff --git a/bin/core/src/alert/mod.rs b/bin/core/src/alert/mod.rs +index 9eba5da..1f51ac2 100644 +--- a/bin/core/src/alert/mod.rs ++++ b/bin/core/src/alert/mod.rs +@@ -474,14 +474,13 @@ fn standard_alert_content(alert: &Alert) -> String { + ) + } + AlertData::Custom { message, details } => { +- format!( +- "{level} | {message}{}", +- if details.is_empty() { +- format_args!("") +- } else { +- format_args!("\n{details}") +- } +- ) ++ let details_str = if details.is_empty() { ++ String::new() ++ } else { ++ format!("\n{details}") ++ }; ++ ++ format!("{level} | {message}{details_str}") + } + AlertData::None {} => Default::default(), + }