diff --git a/pkgs/by-name/ma/mactop/package.nix b/pkgs/by-name/ma/mactop/package.nix index 660e642a33f61..8cdc9432040eb 100644 --- a/pkgs/by-name/ma/mactop/package.nix +++ b/pkgs/by-name/ma/mactop/package.nix @@ -2,30 +2,35 @@ lib, buildGoModule, fetchFromGitHub, + versionCheckHook, }: buildGoModule rec { pname = "mactop"; - version = "0.1.9"; + version = "0.2.3"; src = fetchFromGitHub { owner = "context-labs"; repo = "mactop"; - rev = "refs/tags/v${version}"; - hash = "sha256-r9je+oeedQJsFBWWbOUcUls/EX0JZveUkmsXXtC8O0Q="; + tag = "v${version}"; + hash = "sha256-xWUCOmNwhxmutY7G+FmxT7mabexuBIcgFzX++zsdnN4="; }; - vendorHash = "sha256-/KecVx4Gp776t8gFSO29E1q9v29nwrKIWZYCpj7IlSo="; + vendorHash = "sha256-BFvd1jJzGYsI2E6BdFy+BwHOAy7VgblcByV/oRCKORs="; ldflags = [ "-s" "-w" ]; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = [ "--version" ]; + meta = { description = "Terminal-based monitoring tool 'top' designed to display real-time metrics for Apple Silicon chips"; homepage = "https://github.com/context-labs/mactop"; - changelog = "https://github.com/context-labs/mactop/releases/tag/${lib.removePrefix "refs/tags/" src.rev}"; + changelog = "https://github.com/context-labs/mactop/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium ]; mainProgram = "mactop";