2022-02-10 20:34:41 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ent-go";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.11.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ent";
|
|
|
|
repo = "ent";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-EPUaBOvEAOjA24EYD0pyuNRdyX9qPxERXrBzHXC6cLI=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
vendorSha256 = "sha256-Q5vnfhUcbTmk3+t0D0z4dwU6pXKT7/hTfVHOUPXEzrg=";
|
2022-02-10 20:34:41 +00: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";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://entgo.io/";
|
2022-02-10 20:34:41 +00:00
|
|
|
downloadPage = "https://github.com/ent/ent";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ superherointj ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "ent";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|