2022-02-01 18:38:43 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ent-go";
|
2023-12-14 17:58:01 +01:00
|
|
|
version = "0.12.5";
|
2022-02-01 18:38:43 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ent";
|
|
|
|
repo = "ent";
|
|
|
|
rev = "v${version}";
|
2023-12-14 17:58:01 +01:00
|
|
|
sha256 = "sha256-g4n9cOTv/35WkvMjrtP2eEcbiu5kiafVXifz1zlEuCY=";
|
2022-02-01 18:38:43 +01:00
|
|
|
};
|
|
|
|
|
2023-12-14 17:58:01 +01:00
|
|
|
vendorHash = "sha256-DUi4Ik+qFbx4LIm9MDJ4H9/+sIfCzK8MMGKp0GIGX7w=";
|
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";
|
2022-05-05 02:46:39 +02:00
|
|
|
homepage = "https://entgo.io/";
|
2022-02-01 18:38:43 +01:00
|
|
|
downloadPage = "https://github.com/ent/ent";
|
|
|
|
license = licenses.asl20;
|
2022-10-04 19:06:48 +02:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-05-05 02:46:39 +02:00
|
|
|
mainProgram = "ent";
|
2022-02-01 18:38:43 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|