From 69f31f3fe6f477f3cf2cd37dcc034264b80ac323 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 2 Oct 2020 13:24:55 -0700 Subject: [PATCH] catfs: init at unstable-2020-03-21 --- pkgs/os-specific/linux/catfs/default.nix | 47 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/os-specific/linux/catfs/default.nix diff --git a/pkgs/os-specific/linux/catfs/default.nix b/pkgs/os-specific/linux/catfs/default.nix new file mode 100644 index 000000000000..0ca585fab47b --- /dev/null +++ b/pkgs/os-specific/linux/catfs/default.nix @@ -0,0 +1,47 @@ +{ lib, rustPlatform, fetchFromGitHub +, fetchpatch +, fuse +, pkg-config +}: + +rustPlatform.buildRustPackage rec { + pname = "catfs"; + version = "unstable-2020-03-21"; + + src = fetchFromGitHub { + owner = "kahing"; + repo = pname; + rev = "daa2b85798fa8ca38306242d51cbc39ed122e271"; + sha256 = "0zca0c4n2p9s5kn8c9f9lyxdf3df88a63nmhprpgflj86bh8wgf5"; + }; + + cargoSha256 = "0v6lxwj4vcph32np68awpncafvf1dwcik9a2asa0lkb7kmfdjsjk"; + + cargoPatches = [ + # update cargo lock + (fetchpatch { + url = "https://github.com/kahing/catfs/commit/f838c1cf862cec3f1d862492e5be82b6dbe16ac5.patch"; + sha256 = "1r1p0vbr3j9xyj9r1ahipg4acii3m4ni4m9mp3avbi1rfgzhblhw"; + }) + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ba9b59be461b..49e550bd27ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19924,6 +19924,8 @@ in castor = callPackage ../applications/networking/browsers/castor { }; + catfs = callPackage ../os-specific/linux/catfs { }; + catimg = callPackage ../tools/misc/catimg { }; catt = callPackage ../applications/video/catt { };