hwatch: cleanup

This commit is contained in:
Angel J
2026-05-15 19:07:43 -07:00
parent d34f7eab24
commit 65594df855

View File

@@ -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";