diff --git a/pkgs/os-specific/linux/catfs/default.nix b/pkgs/os-specific/linux/catfs/default.nix index 0cd782c0f05f..36eaf607201e 100644 --- a/pkgs/os-specific/linux/catfs/default.nix +++ b/pkgs/os-specific/linux/catfs/default.nix @@ -15,6 +15,11 @@ rustPlatform.buildRustPackage rec { hash = "sha256-OvmtU2jpewP5EqPwEFAf67t8UCI1WuzUO2QQj4cH1Ak="; }; + patches = [ + # monitor https://github.com/kahing/catfs/issues/71 + ./fix-for-rust-1.65.diff + ]; + cargoHash = "sha256-xF1J2Pr4qtNFcd2kec4tnbdYxoLK+jRnzp8p+cmNOcI="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/os-specific/linux/catfs/fix-for-rust-1.65.diff b/pkgs/os-specific/linux/catfs/fix-for-rust-1.65.diff new file mode 100644 index 000000000000..4208c362ebcd --- /dev/null +++ b/pkgs/os-specific/linux/catfs/fix-for-rust-1.65.diff @@ -0,0 +1,13 @@ +diff --git a/src/catfs/file.rs b/src/catfs/file.rs +index 6e781eb..92fdd80 100644 +--- a/src/catfs/file.rs ++++ b/src/catfs/file.rs +@@ -569,7 +569,7 @@ impl Handle { + path: &dyn AsRef, + create: bool, + ) -> error::Result<()> { +- let _ = self.page_in_res.0.lock().unwrap(); ++ drop(self.page_in_res.0.lock().unwrap()); + + let mut buf = [0u8; 0]; + let mut flags = rlibc::O_RDWR;