Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3buildGoModule rec {
4 pname = "ent-go";
5 version = "0.11.0";
6
7 src = fetchFromGitHub {
8 owner = "ent";
9 repo = "ent";
10 rev = "v${version}";
11 sha256 = "sha256-EPUaBOvEAOjA24EYD0pyuNRdyX9qPxERXrBzHXC6cLI=";
12 };
13
14 vendorSha256 = "sha256-Q5vnfhUcbTmk3+t0D0z4dwU6pXKT7/hTfVHOUPXEzrg=";
15
16 subPackages = [ "cmd/ent" ];
17
18 ldflags = [
19 "-s"
20 "-w"
21 ];
22
23 nativeBuildInputs = [ installShellFiles ];
24
25 postInstall = ''
26 installShellCompletion --cmd ent \
27 --bash <($out/bin/ent completion bash) \
28 --fish <($out/bin/ent completion fish) \
29 --zsh <($out/bin/ent completion zsh)
30 '';
31
32 meta = with lib; {
33 description = "An entity framework for Go";
34 homepage = "https://entgo.io/";
35 downloadPage = "https://github.com/ent/ent";
36 license = licenses.asl20;
37 maintainers = with maintainers; [ ];
38 mainProgram = "ent";
39 };
40}
41