zinc: init at 0.3.5

This commit is contained in:
Mostly Void 2022-08-16 13:17:15 +05:30
parent 8fb7b99c41
commit a79bf2bfea
No known key found for this signature in database
GPG Key ID: E2B7342D0CAA82C2
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{ lib
, buildGoModule
, fetchFromGitHub
, buildNpmPackage
}:
let
version = "0.3.5";
src = fetchFromGitHub {
owner = "zinclabs";
repo = "zinc";
rev = "v${version}";
sha256 = "sha256-qu3foI5Rnt2sf+B+roJOwUNvOfawKmcKq7UrmviQsHA=";
};
webui = buildNpmPackage {
inherit src version;
pname = "zinc-ui";
sourceRoot = "source/web";
npmDepsHash = "sha256-Ao/kDryui4thurqap/d/+82z058HoF2ZJSVKQqVwfVg=";
CYPRESS_INSTALL_BINARY = 0; # cypress tries to download binaries otherwise
installPhase = ''
mkdir -p $out/share
mv dist $out/share/zinc-ui
'';
};
in
buildGoModule rec {
pname = "zinc";
inherit src version;
preBuild = ''
cp -r ${webui}/share/zinc-ui web/dist
'';
vendorSha256 = "sha256-akjb0cxHbITKS26c+7lVSHWO/KRoQVVKzAOra+tdAD8=";
subPackages = [ "cmd/zinc" ];
CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/zinclabs/zinc/pkg/meta.Version=${version}"
];
meta = with lib; {
description = "A lightweight alternative to elasticsearch that requires minimal resources, written in Go";
homepage = "https://github.com/zinclabs/zinc";
license = licenses.asl20;
maintainers = with maintainers; [ dit7ya ];
};
}

View File

@ -13195,6 +13195,8 @@ with pkgs;
zip = callPackage ../tools/archivers/zip { };
zinc = callPackage ../servers/search/zinc { };
zkfuse = callPackage ../tools/filesystems/zkfuse { };
zpaq = callPackage ../tools/archivers/zpaq { };