depot/third_party/nixpkgs/pkgs/tools/misc/hwatch/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

40 lines
1.1 KiB
Nix

{ lib, fetchFromGitHub, rustPlatform, testers, hwatch, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "hwatch";
version = "0.3.15";
src = fetchFromGitHub {
owner = "blacknon";
repo = pname;
rev = "refs/tags/${version}";
sha256 = "sha256-UmNxdp9acRCKnUsKw7Z9z3knRvVkqQ5atxR/dqpGBYE=";
};
cargoHash = "sha256-pEhogmK2WBj/PxcDtJs/H0XZhPiz3zCQMX2eUcAfnTE=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd hwatch \
--bash $src/completion/bash/hwatch-completion.bash \
--fish $src/completion/fish/hwatch.fish \
--zsh $src/completion/zsh/_hwatch \
'';
passthru.tests.version = testers.testVersion {
package = hwatch;
};
meta = with lib; {
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.
'';
license = licenses.mit;
maintainers = with maintainers; [ hamburger1984 ];
mainProgram = "hwatch";
};
}