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";
|
2023-04-19 08:18:13 +03:00
|
|
|
version = "0.3.10";
|
2022-06-10 17:41:37 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "blacknon";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2023-04-19 08:18:13 +03:00
|
|
|
sha256 = "sha256-RvsL6OajXwEY77W3Wj6GMijYwn7XDnKiJyDXbNG01ag=";
|
2022-06-10 17:41:37 +03:00
|
|
|
};
|
|
|
|
|
2023-04-19 08:18:13 +03:00
|
|
|
cargoHash = "sha256-v7MvXnc9Xa+6QAyi2N9/WtqnvXf9M1SlR86kNjfu46Y=";
|
2022-07-05 19:37:46 +03: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;
|
|
|
|
};
|
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";
|
2023-07-30 18:20:02 +03:00
|
|
|
description = "Modern alternative to the watch command";
|
2022-06-10 17:41:37 +03:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|