nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildGoModule
3, fetchFromGitHub
4, stdenv
5}:
6
7buildGoModule rec {
8 pname = "juicefs";
9 version = "1.0.4";
10
11 src = fetchFromGitHub {
12 owner = "juicedata";
13 repo = pname;
14 rev = "v${version}";
15 sha256 = "sha256-Bez9wwAPDyYYECDwW9CB/ACTGUJl6PW3YiipIGY0Zbo=";
16 };
17
18 vendorHash = "sha256-dsKNFIXcSeYUyh1TO1h1Ze3jS97pdhn2eU9hHjTARCo=";
19
20 ldflags = [ "-s" "-w" ];
21
22 doCheck = false; # requires network access
23
24 # we dont need the libjfs binary
25 postFixup = ''
26 rm $out/bin/libjfs
27 '';
28
29 postInstall = ''
30 ln -s $out/bin/juicefs $out/bin/mount.juicefs
31 '';
32
33 meta = with lib; {
34 description = "A distributed POSIX file system built on top of Redis and S3";
35 homepage = "https://www.juicefs.com/";
36 license = licenses.asl20;
37 maintainers = with maintainers; [ dit7ya ];
38 broken = stdenv.isDarwin;
39 };
40}