2020-11-30 08:33:03 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, fuse
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "catfs";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "0.9.0";
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kahing";
|
|
|
|
repo = pname;
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-OvmtU2jpewP5EqPwEFAf67t8UCI1WuzUO2QQj4cH1Ak=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
patches = [
|
|
|
|
# monitor https://github.com/kahing/catfs/issues/71
|
|
|
|
./fix-for-rust-1.65.diff
|
2020-11-30 08:33:03 +00:00
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
cargoHash = "sha256-xF1J2Pr4qtNFcd2kec4tnbdYxoLK+jRnzp8p+cmNOcI=";
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ fuse ];
|
|
|
|
|
|
|
|
# require fuse module to be active to run tests
|
|
|
|
# instead, run command
|
|
|
|
doCheck = false;
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/catfs --help > /dev/null
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Caching filesystem written in Rust";
|
|
|
|
homepage = "https://github.com/kahing/catfs";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|