1{ lib, rustPlatform, fetchFromGitHub
2, fetchpatch
3, fuse
4, pkg-config
5}:
6
7rustPlatform.buildRustPackage rec {
8 pname = "catfs";
9 version = "unstable-2020-03-21";
10
11 src = fetchFromGitHub {
12 owner = "kahing";
13 repo = pname;
14 rev = "daa2b85798fa8ca38306242d51cbc39ed122e271";
15 sha256 = "0zca0c4n2p9s5kn8c9f9lyxdf3df88a63nmhprpgflj86bh8wgf5";
16 };
17
18 cargoSha256 = "1agcwq409s40kyij487wjrp8mj7942r9l2nqwks4xqlfb0bvaimf";
19
20 cargoPatches = [
21 # update cargo lock
22 (fetchpatch {
23 url = "https://github.com/kahing/catfs/commit/f838c1cf862cec3f1d862492e5be82b6dbe16ac5.patch";
24 sha256 = "1r1p0vbr3j9xyj9r1ahipg4acii3m4ni4m9mp3avbi1rfgzhblhw";
25 })
26 ];
27
28 nativeBuildInputs = [ pkg-config ];
29
30 buildInputs = [ fuse ];
31
32 # require fuse module to be active to run tests
33 # instead, run command
34 doCheck = false;
35 doInstallCheck = true;
36 installCheckPhase = ''
37 $out/bin/catfs --help > /dev/null
38 '';
39
40 meta = with lib; {
41 description = "Caching filesystem written in Rust";
42 homepage = "https://github.com/kahing/catfs";
43 license = licenses.asl20;
44 platforms = platforms.linux;
45 maintainers = with maintainers; [ jonringer ];
46 };
47}