From 65594df855b5a080dcba41e7539b02470de212cf Mon Sep 17 00:00:00 2001 From: Angel J <78835633+Iamanaws@users.noreply.github.com> Date: Fri, 15 May 2026 19:07:43 -0700 Subject: [PATCH] hwatch: cleanup --- pkgs/by-name/hw/hwatch/package.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/hw/hwatch/package.nix b/pkgs/by-name/hw/hwatch/package.nix index d68c6d252a5a..99a44fe7b7a9 100644 --- a/pkgs/by-name/hw/hwatch/package.nix +++ b/pkgs/by-name/hw/hwatch/package.nix @@ -2,6 +2,7 @@ lib, fetchFromGitHub, rustPlatform, + stdenv, testers, hwatch, installShellFiles, @@ -15,18 +16,17 @@ rustPlatform.buildRustPackage (finalAttrs: { owner = "blacknon"; repo = "hwatch"; tag = finalAttrs.version; - sha256 = "sha256-lMsBzMDMgpHxcQFtfZ4K7r2WRUaVR8Ry/kPvwfzPObI="; + hash = "sha256-lMsBzMDMgpHxcQFtfZ4K7r2WRUaVR8Ry/kPvwfzPObI="; }; cargoHash = "sha256-UnaZZEmX5XoTVFLEFj5JkJXJkjoUBwzJokfffJTPP4M="; nativeBuildInputs = [ installShellFiles ]; - postInstall = '' - installShellCompletion --cmd hwatch \ - --bash $src/completion/bash/hwatch-completion.bash \ - --fish $src/completion/fish/hwatch.fish \ - --zsh $src/completion/zsh/_hwatch + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + for shell in bash fish zsh; do + installShellCompletion --cmd hwatch --"$shell" <("$out/bin/hwatch" --completion "$shell") + done ''; passthru.tests.version = testers.testVersion { @@ -34,12 +34,13 @@ rustPlatform.buildRustPackage (finalAttrs: { }; meta = { - homepage = "https://github.com/blacknon/hwatch"; description = "Modern alternative to the watch command"; longDescription = '' A modern alternative to the watch command, records the differences in execution results and can check this differences at after. ''; + homepage = "https://github.com/blacknon/hwatch"; + changelog = "https://github.com/blacknon/hwatch/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ iamanaws ]; mainProgram = "hwatch";