From 1649ea3c0992131d937639bf389ef01fc56fbf51 Mon Sep 17 00:00:00 2001 From: Ashish Kumar <143941235+ashish0kumar@users.noreply.github.com> Date: Wed, 11 Jun 2025 16:03:45 +0530 Subject: [PATCH] crictty: init at 0.1.2 --- pkgs/by-name/cr/crictty/package.nix | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/cr/crictty/package.nix 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; + }; +})