2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, CoreServices, installShellFiles }:
|
2018-02-18 11:46:24 +00:00
|
|
|
|
2018-08-21 11:00:11 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-05-29 08:36:29 +01:00
|
|
|
pname = "watchexec";
|
2020-10-01 05:20:00 +01:00
|
|
|
version = "1.14.1";
|
2018-02-18 11:46:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-05-29 08:36:29 +01:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2018-08-21 11:00:11 +01:00
|
|
|
rev = version;
|
2020-10-01 05:20:00 +01:00
|
|
|
sha256 = "0m4hipjgg64572lzqy9hz4iq9c4awc93c9rmnpap5iyi855x7idj";
|
2018-02-18 11:46:24 +00:00
|
|
|
};
|
|
|
|
|
2020-10-01 05:20:00 +01:00
|
|
|
cargoSha256 = "0035pqr61mdx699hd4f8hnxknvsdg67l6ys7gxym3fzd9dcmqqff";
|
2019-11-19 09:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2018-02-18 11:46:24 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
2018-10-27 17:32:39 +01:00
|
|
|
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/watchexec/watchexec";
|
2018-02-18 11:46:24 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = [ maintainers.michalrus ];
|
2018-10-27 17:32:39 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2018-02-18 11:46:24 +00:00
|
|
|
};
|
|
|
|
}
|