diff --git a/pkgs/applications/networking/remote/rustdesk/default.nix b/pkgs/applications/networking/remote/rustdesk/default.nix index 341cc22976a9..fbbef2dc6193 100644 --- a/pkgs/applications/networking/remote/rustdesk/default.nix +++ b/pkgs/applications/networking/remote/rustdesk/default.nix @@ -38,6 +38,11 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-IlrfqwNyaSHE9Ct0mn7MUxEg7p1Ku34eOMYelEAYFW8="; }; + patches = [ + # based on https://github.com/rustdesk/rustdesk/pull/1900 + ./fix-for-rust-1.65.diff + ]; + cargoSha256 = "sha256-1OMWEk+DerltF7kwdo4d04rbgIFLHBRq3vZaL7jtrdE="; LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"; diff --git a/pkgs/applications/networking/remote/rustdesk/fix-for-rust-1.65.diff b/pkgs/applications/networking/remote/rustdesk/fix-for-rust-1.65.diff new file mode 100644 index 000000000000..a70f51e0a76a --- /dev/null +++ b/pkgs/applications/networking/remote/rustdesk/fix-for-rust-1.65.diff @@ -0,0 +1,31 @@ +diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs +index 74982de5..308bcf80 100644 +--- a/libs/hbb_common/src/config.rs ++++ b/libs/hbb_common/src/config.rs +@@ -656,7 +656,7 @@ const PEERS: &str = "peers"; + + impl PeerConfig { + pub fn load(id: &str) -> PeerConfig { +- let _ = CONFIG.read().unwrap(); // for lock ++ let _lock = CONFIG.read().unwrap(); + match confy::load_path(&Self::path(id)) { + Ok(config) => config, + Err(err) => { +@@ -667,7 +667,7 @@ impl PeerConfig { + } + + pub fn store(&self, id: &str) { +- let _ = CONFIG.read().unwrap(); // for lock ++ let _lock = CONFIG.read().unwrap(); + if let Err(err) = confy::store_path(Self::path(id), self) { + log::error!("Failed to store config: {}", err); + } +@@ -808,7 +808,7 @@ pub struct LanPeers { + + impl LanPeers { + pub fn load() -> LanPeers { +- let _ = CONFIG.read().unwrap(); // for lock ++ let _lock = CONFIG.read().unwrap(); + match confy::load_path(&Config::file_("_lan_peers")) { + Ok(peers) => peers, + Err(err) => {