mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
komodo: temporary patch fix for build after rustc 1.9.2 (#499634)
This commit is contained in:
commit
f27b06d07e
2 changed files with 57 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
52
pkgs/by-name/ko/komodo/rustc-1_9_2-fixes.patch
Normal file
52
pkgs/by-name/ko/komodo/rustc-1_9_2-fixes.patch
Normal file
|
|
@ -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(),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue