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 18:37:46 +02:00
{ lib, fetchFromGitHub, rustPlatform, testers, hwatch, installShellFiles }:
2022-06-10 16:41:37 +02:00
rustPlatform.buildRustPackage rec {
pname = "hwatch";
2023-01-12 09:31:24 +01:00
version = "0.3.9";
2022-06-10 16:41:37 +02:00
src = fetchFromGitHub {
owner = "blacknon";
repo = pname;
rev = "refs/tags/${version}";
2023-01-12 09:31:24 +01:00
sha256 = "sha256-O+qKVRPDn7y8JEAF75P6suH4hOfPLjWSNTDGX2V5z3w=";
2022-06-10 16:41:37 +02:00
};
2023-01-12 09:31:24 +01:00
cargoHash = "sha256-Bzg9EfVVSTKVb4nUfJ0Bygd5dRUutk+5MxojYjcJs0M=";
2022-07-05 18:37:46 +02:00
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 16:41:37 +02:00
meta = with lib; {
2022-07-05 18:37:46 +02:00
homepage = "https://github.com/blacknon/hwatch";
2022-06-10 16:41:37 +02: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;
};
}