2022-02-10 20:34:41 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ent-go";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.13.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ent";
|
|
|
|
repo = "ent";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-OEQWNWGVs0QYhPuCGEFgAVaUnfswmvWVt+e0cAdkBKE=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-9KdSGIyi95EVQq9jGoVqK8aq3JXlQXB+Qwlh/Kfz4Oc=";
|
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)
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta = {
|
2022-02-10 20:34:41 +00:00
|
|
|
description = "An entity framework for Go";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://entgo.io/";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/ent/ent/releases/tag/v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
downloadPage = "https://github.com/ent/ent";
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = [ ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "ent";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|