about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/juicefs/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/juicefs/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix b/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix
new file mode 100644
index 000000000000..6f6dd4101597
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, stdenv
+}:
+
+buildGoModule rec {
+  pname = "juicefs";
+  version = "1.1.2";
+
+  src = fetchFromGitHub {
+    owner = "juicedata";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Sf68N5ZKveKM6xZEqF7Ah0KGgOx1cGZpJ2lYkUlgpI0=";
+  };
+
+  vendorHash = "sha256-ofUo/3EQPhXPNeD/3to5oFir/3eAaf9WBHR4DOzcxBQ=";
+
+  ldflags = [ "-s" "-w" ];
+
+  doCheck = false; # requires network access
+
+  # we dont need the libjfs binary
+  postFixup = ''
+    rm $out/bin/libjfs
+  '';
+
+  postInstall = ''
+    ln -s $out/bin/juicefs $out/bin/mount.juicefs
+  '';
+
+  meta = with lib; {
+    description = "A distributed POSIX file system built on top of Redis and S3";
+    homepage = "https://www.juicefs.com/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ dit7ya ];
+    broken = stdenv.isDarwin;
+  };
+}