clipcat: fix build (#437042)

This commit is contained in:
Austin Horstman
2025-08-30 10:26:17 -05:00
committed by GitHub
2 changed files with 26 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
diff --git a/crates/server/src/notification/dummy.rs b/crates/server/src/notification/dummy.rs
index f85dda0..7489f22 100644
--- a/crates/server/src/notification/dummy.rs
+++ b/crates/server/src/notification/dummy.rs
@@ -1,6 +1,9 @@
+#[cfg(test)]
use crate::notification::traits;
+#[cfg(test)]
#[derive(Clone, Copy, Debug, Default)]
pub struct Notification {}
+#[cfg(test)]
impl traits::Notification for Notification {}
+12
View File
@@ -5,6 +5,7 @@
rustPlatform,
protobuf,
installShellFiles,
writableTmpDirAsHomeHook,
}:
rustPlatform.buildRustPackage rec {
@@ -20,9 +21,20 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-UA+NTtZ2qffUPUmvCidnTHwFzD3WOPTlxHR2e2vKwPQ=";
patches = [
# Fix compilation errors caused by stricter restrictions on unused code in Rust 1.89.
# TODO: remove this patch after upstream fix it.
./dummy.patch
];
nativeBuildInputs = [
protobuf
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# fix following error on darwin:
# objc/notify.h:1:9: fatal error: could not build module 'Cocoa'
writableTmpDirAsHomeHook
];
checkFlags = [