Files
nixpkgs/pkgs/by-name/ma/macmon/package.nix
Mirza Arnaut 3e2ee6a200 macmon: add nix-update-script
Makes it easier to update the package down the line,
especially with the versionCheckHook checking if it compiled correctly!
2026-04-09 00:59:46 +02:00

39 lines
956 B
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "macmon";
version = "0.6.1";
src = fetchFromGitHub {
owner = "vladkens";
repo = "macmon";
tag = "v${finalAttrs.version}";
hash = "sha256-GiSF5PBRUcKZzd9vWf9MmKKZbtqchnu0DjFgbXmp7bg=";
};
cargoHash = "sha256-b9CpHSC3/kj7lHs+QhDqnRZfda9rtJJEs3j24NDZSPQ=";
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Sudoless performance monitoring for Apple Silicon processors";
homepage = "https://github.com/vladkens/macmon";
changelog = "https://github.com/vladkens/macmon/releases/tag/${finalAttrs.src.tag}";
platforms = [ "aarch64-darwin" ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ schrobingus ];
mainProgram = "macmon";
};
})