2021-10-04 12:37:57 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, CoreServices, Foundation, installShellFiles, libiconv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "watchexec";
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "1.17.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2021-10-04 12:37:57 +00:00
|
|
|
rev = "cli-v${version}";
|
|
|
|
sha256 = "13yqghdhakkwp607j84a1vbqgnqqn77a5mh27cr24352ik2vkrkq";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
cargoSha256 = "0grzfzxw705zs5qb2h7k0yws45m20ihhh4mnpmk3wargbxpn6gsh";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Foundation libiconv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage doc/watchexec.1
|
|
|
|
installShellCompletion --zsh --name _watchexec completions/zsh
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Executes commands in response to file modifications";
|
2021-10-04 12:37:57 +00:00
|
|
|
homepage = "https://watchexec.github.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = [ maintainers.michalrus ];
|
|
|
|
};
|
|
|
|
}
|