summary refs log tree commit diff
path: root/pkgs/os-specific/linux/catfs/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-11-27 15:09:19 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2020-11-27 15:09:19 +0100
commitb2a3891e12777fa5e16bc93bc95c0d5ba256ebaf (patch)
tree220c385a8657d85bb6b305819a1842a3b1f4079c /pkgs/os-specific/linux/catfs/default.nix
parent977848375167f4671a03ccc0dbf5896f4cf0d3fe (diff)
parentbe36f6f0a0ffbeef228a021f5a343f5ce7a183de (diff)
downloadnixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.gz
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.bz2
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.lz
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.xz
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.zst
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/os-specific/linux/catfs/default.nix')
-rw-r--r--pkgs/os-specific/linux/catfs/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/catfs/default.nix b/pkgs/os-specific/linux/catfs/default.nix
new file mode 100644
index 00000000000..0ca585fab47
--- /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 ];
+  };
+}