nixpkgs/pkgs/applications/networking/seaweedfs/default.nix
2023-05-25 21:17:42 -04:00

62 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, seaweedfs
}:
buildGoModule rec {
pname = "seaweedfs";
version = "3.51";
src = fetchFromGitHub {
owner = "seaweedfs";
repo = "seaweedfs";
rev = version;
hash = "sha256-+5eni4i3LoPE0+Qzw4f6I//y5MzGxgj3NrT7YtYs/Fw=";
};
vendorHash = "sha256-LeWI5wbq06sBhAf5gqK8Zr8nmB9W1tDUUqF1HeZa1SM=";
subPackages = [ "weed" ];
ldflags = [
"-w"
"-s"
"-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=N/A"
];
tags = [
"elastic"
"gocdk"
"sqlite"
"ydb"
"tikv"
];
preBuild = ''
export GODEBUG=http2client=0
'';
preCheck = ''
# Test all targets.
unset subPackages
# Remove unmaintained tests ahd those that require additional services.
rm -rf unmaintained test/s3
'';
passthru.tests.version = testers.testVersion {
package = seaweedfs;
command = "weed version";
};
meta = with lib; {
description = "Simple and highly scalable distributed file system";
homepage = "https://github.com/chrislusf/seaweedfs";
maintainers = with maintainers; [ azahi cmacrae wozeparrot ];
mainProgram = "weed";
license = licenses.asl20;
};
}