diff --git a/pkgs/by-name/cr/crictty/package.nix b/pkgs/by-name/cr/crictty/package.nix new file mode 100644 index 000000000000..929c86d05513 --- /dev/null +++ b/pkgs/by-name/cr/crictty/package.nix @@ -0,0 +1,44 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + versionCheckHook, + nix-update-script, +}: + +buildGoModule (finalAttrs: { + pname = "crictty"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "ashish0kumar"; + repo = "crictty"; + tag = "v${finalAttrs.version}"; + hash = "sha256-J8I5HsG0fJyp+PEkUPvyrZm587qZ3Yz2jofCmEKGmps="; + }; + + vendorHash = "sha256-B5+F9WXRkJhiafC+jhzZRvHlDH9XBkHQL5kBnrPRUTk="; + + ldflags = [ + "-s" + "-w" + "-X main.version=${finalAttrs.version}" + ]; + + doInstallCheck = true; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + changelog = "https://github.com/ashish0kumar/crictty/releases/tag/v${finalAttrs.version}"; + description = "Terminal-based cricket scorecard viewer"; + homepage = "https://github.com/ashish0kumar/crictty"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ashish0kumar ]; + mainProgram = "crictty"; + platforms = lib.platforms.unix; + }; +})