From 59aec3697e48aee3c57f7f309a18dda38c92dc8f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 9 Dec 2022 14:16:20 -0800 Subject: [PATCH] catfs: patch to compile using rust 1.65 --- pkgs/os-specific/linux/catfs/default.nix | 5 +++++ pkgs/os-specific/linux/catfs/fix-for-rust-1.65.diff | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/os-specific/linux/catfs/fix-for-rust-1.65.diff 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;