2021-10-01 09:20:00 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, CoreServices, Foundation, installShellFiles, libiconv }:
|
2018-02-18 11:46:24 +00:00
|
|
|
|
2018-08-21 10:00:11 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-05-29 07:36:29 +00:00
|
|
|
pname = "watchexec";
|
2022-04-22 04:20:00 +00:00
|
|
|
version = "1.19.0";
|
2018-02-18 11:46:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-05-29 07:36:29 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2021-10-01 09:20:00 +00:00
|
|
|
rev = "cli-v${version}";
|
2022-04-22 04:20:00 +00:00
|
|
|
sha256 = "sha256-Zqu6Qor7kHSeOFyHjcrl6RhB8gL9pljHt7hEd6/0Kss=";
|
2018-02-18 11:46:24 +00:00
|
|
|
};
|
|
|
|
|
2022-04-22 04:20:00 +00:00
|
|
|
cargoSha256 = "sha256-XwgoYaqgDkNggzi2TL/JPfh8LSFSzSWOVMbkmhXX73I=";
|
2019-11-19 09:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2018-02-18 11:46:24 +00:00
|
|
|
|
2021-10-01 09:20:00 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Foundation libiconv ];
|
2018-10-27 16:32:39 +00:00
|
|
|
|
2022-04-22 04:20:00 +00:00
|
|
|
checkFlags = [ "--skip=help" "--skip=help_short" ];
|
|
|
|
|
2019-11-19 09:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage doc/watchexec.1
|
|
|
|
installShellCompletion --zsh --name _watchexec completions/zsh
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-18 11:46:24 +00:00
|
|
|
description = "Executes commands in response to file modifications";
|
2021-10-01 09:20:00 +00:00
|
|
|
homepage = "https://watchexec.github.io/";
|
2018-02-18 11:46:24 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = [ maintainers.michalrus ];
|
|
|
|
};
|
|
|
|
}
|