Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "goctl";
9 version = "1.8.5";
10
11 src = fetchFromGitHub {
12 owner = "zeromicro";
13 repo = "go-zero";
14 tag = "v${version}";
15 hash = "sha256-12nlrwzzM5wPyiC3vJfs7sJ7kPiRy1H0gTeWB+9bqKI=";
16 };
17
18 vendorHash = "sha256-ReLXN4SUNQ7X0yHy8FFwD8lRRm05q2FdEdohXpfuZIY=";
19
20 modRoot = "tools/goctl";
21 subPackages = [ "." ];
22
23 doCheck = true;
24
25 ldflags = [
26 "-s"
27 "-w"
28 ];
29
30 meta = {
31 description = "CLI handcuffle of go-zero, a cloud-native Go microservices framework";
32 longDescription = ''
33 goctl is a go-zero's built-in handcuffle that is a major
34 lever to increase development efficiency, generating code,
35 document, deploying k8s yaml, dockerfile, etc.
36 '';
37 homepage = "https://go-zero.dev";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ cococolanosugar ];
40 mainProgram = "goctl";
41 };
42}