2022-02-10 20:34:41 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ent-go";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.12.5";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ent";
|
|
|
|
repo = "ent";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
sha256 = "sha256-g4n9cOTv/35WkvMjrtP2eEcbiu5kiafVXifz1zlEuCY=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
vendorHash = "sha256-DUi4Ik+qFbx4LIm9MDJ4H9/+sIfCzK8MMGKp0GIGX7w=";
|
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;
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "ent";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|