nixpkgs/pkgs/tools/misc/hwatch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.2 KiB
Nix
Raw Normal View History

2022-07-05 19:37:46 +03:00
{ lib, fetchFromGitHub, rustPlatform, testers, hwatch, installShellFiles }:
2022-06-10 17:41:37 +03:00
rustPlatform.buildRustPackage rec {
pname = "hwatch";
2022-07-05 19:37:46 +03:00
version = "0.3.7";
2022-06-10 17:41:37 +03:00
src = fetchFromGitHub {
owner = "blacknon";
repo = pname;
rev = "refs/tags/${version}";
2022-07-05 19:37:46 +03:00
sha256 = "sha256-FVqvwqsHkV/yK5okL1p6TiNUGDK2ZnzVNO4UDVkG+zM=";
2022-06-10 17:41:37 +03:00
};
2022-07-05 19:37:46 +03:00
cargoSha256 = "sha256-E4qh2cfpVNUa9OyJowSsaHU7pYiNu7IpxwISP0djVRA=";
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;
command = "hwatch --version";
version = version;
};
2022-06-10 17:41:37 +03:00
meta = with lib; {
2022-07-05 19:37:46 +03:00
homepage = "https://github.com/blacknon/hwatch";
2022-06-10 17:41:37 +03:00
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 ];
platforms = platforms.linux;
};
}