1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "commitizen-go";
9 version = "1.0.3";
10
11 # we can't obtain the commit hash when using fetchFromGithub
12 commit_revision = "unspecified (nix build)";
13
14 src = fetchFromGitHub {
15 owner = "lintingzhen";
16 repo = "commitizen-go";
17 rev = "v${version}";
18 hash = "sha256-pAWdIQ3icXEv79s+sUVhQclsNcZg+PTZZ6I6JPo7pNg=";
19 };
20
21 vendorHash = "sha256-TbrgKE7P3c0gkqJPDkbchWTPkOuTaTAWd8wDcpffcCc=";
22
23 subPackages = [ "." ];
24
25 env.CGO_ENABLED = 0;
26
27 ldflags = [
28 "-X 'github.com/lintingzhen/commitizen-go/cmd.revision=${commit_revision}'"
29 "-X 'github.com/lintingzhen/commitizen-go/cmd.version=${version}'"
30 ];
31
32 meta = with lib; {
33 description = "Command line utility to standardize git commit messages, golang version";
34 homepage = "https://github.com/lintingzhen/commitizen-go";
35 license = licenses.mit;
36 maintainers = with maintainers; [ seanrmurphy ];
37 mainProgram = "commitizen-go";
38 };
39}