nixpkgs/pkgs/tools/misc/watchexec/default.nix
2020-07-04 11:56:16 +00:00

33 lines
938 B
Nix

{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "watchexec";
version = "1.14.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "0nvd8x60nkk8izqy8m8m1fi0x48s9sjh4zfl8d2ig46lqc8n5cpm";
};
cargoSha256 = "08pv7nr471apzy77da1pffdmx2dgf5mbj09302cfmf8sj49saal6";
nativeBuildInputs = [ installShellFiles ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
postInstall = ''
installManPage doc/watchexec.1
installShellCompletion --zsh --name _watchexec completions/zsh
'';
meta = with stdenv.lib; {
description = "Executes commands in response to file modifications";
homepage = "https://github.com/watchexec/watchexec";
license = with licenses; [ asl20 ];
maintainers = [ maintainers.michalrus ];
platforms = platforms.linux ++ platforms.darwin;
};
}