diff options
| author | Sean Murphy <sean@gopaddy.ch> | 2024-06-05 14:18:51 +0200 |
|---|---|---|
| committer | Sean Murphy <sean@gopaddy.ch> | 2024-07-12 14:59:36 +0200 |
| commit | 3b744c95861509bcb4f2a892e34039ce334c6d11 (patch) | |
| tree | 710217fd420f8b773cbf291fbaa31099f75eb0f0 | |
| parent | Merge pull request #317382 from JohnRTitor/corefonts (diff) | |
| download | nixpkgs-3b744c95861509bcb4f2a892e34039ce334c6d11.tar.gz | |
commitizen-go: init at 1.0.3
Co-authored-by: Aleksana <alexander.huang.y@gmail.com>
| -rw-r--r-- | pkgs/by-name/co/commitizen-go/package.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/by-name/co/commitizen-go/package.nix b/pkgs/by-name/co/commitizen-go/package.nix new file mode 100644 index 000000000000..e6936ed3f04a --- /dev/null +++ b/pkgs/by-name/co/commitizen-go/package.nix @@ -0,0 +1,39 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "commitizen-go"; + version = "1.0.3"; + + # we can't obtain the commit hash when using fetchFromGithub + commit_revision = "unspecified (nix build)"; + + src = fetchFromGitHub { + owner = "lintingzhen"; + repo = "commitizen-go"; + rev = "v${version}"; + hash = "sha256-pAWdIQ3icXEv79s+sUVhQclsNcZg+PTZZ6I6JPo7pNg="; + }; + + vendorHash = "sha256-TbrgKE7P3c0gkqJPDkbchWTPkOuTaTAWd8wDcpffcCc="; + + subPackages = [ "." ]; + + CGO_ENABLED = 0; + + ldflags = [ + "-X 'github.com/lintingzhen/commitizen-go/cmd.revision=${commit_revision}'" + "-X 'github.com/lintingzhen/commitizen-go/cmd.version=${version}'" + ]; + + meta = with lib; { + description = "Command line utility to standardize git commit messages, golang version"; + homepage = "https://github.com/lintingzhen/commitizen-go"; + license = licenses.mit; + maintainers = with maintainers; [ seanrmurphy ]; + mainProgram = "commitizen-go"; + }; +} |
