2022-02-01 18:38:43 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ent-go";
|
2022-03-05 06:04:29 +01:00
|
|
|
version = "0.10.1";
|
2022-02-01 18:38:43 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ent";
|
|
|
|
repo = "ent";
|
|
|
|
rev = "v${version}";
|
2022-03-05 06:04:29 +01:00
|
|
|
sha256 = "sha256-MvfbQKGVYWbZkqc3X3BqsB+z2KMkr0gMOquL02qHwUY=";
|
2022-02-01 18:38:43 +01:00
|
|
|
};
|
|
|
|
|
2022-03-05 06:04:29 +01:00
|
|
|
vendorSha256 = "sha256-BF2eD/jOtY1XhZ0hB7f3/frKQYwS9PbuGxum5SSnjzA=";
|
2022-02-01 18:38:43 +01:00
|
|
|
|
|
|
|
subPackages = [ "cmd/ent" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd ent \
|
|
|
|
--bash <($out/bin/ent completion bash) \
|
|
|
|
--fish <($out/bin/ent completion fish) \
|
|
|
|
--zsh <($out/bin/ent completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An entity framework for Go";
|
|
|
|
downloadPage = "https://github.com/ent/ent";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://entgo.io/";
|
|
|
|
maintainers = with maintainers; [ superherointj ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|