Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
41 lines
976 B
Nix
41 lines
976 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "ent-go";
|
|
version = "0.14.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ent";
|
|
repo = "ent";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Jq5txpjv2JxypOXYA8JKT0CNMIaJksMUIdnbwflVMZA=";
|
|
};
|
|
|
|
vendorHash = "sha256-9KdSGIyi95EVQq9jGoVqK8aq3JXlQXB+Qwlh/Kfz4Oc=";
|
|
|
|
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 = {
|
|
description = "Entity framework for Go";
|
|
homepage = "https://entgo.io/";
|
|
changelog = "https://github.com/ent/ent/releases/tag/v${version}";
|
|
downloadPage = "https://github.com/ent/ent";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ ];
|
|
mainProgram = "ent";
|
|
};
|
|
}
|