1 { lib, stdenv, rustPlatform, fetchFromGitHub, Cocoa, AppKit, installShellFiles }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 hash = "sha256-kbcSm1plh5QS87hGQj9OL1rq2eK6jbGn/kfjPF6kNzo=";
14 cargoHash = "sha256-xLUI7B7clpdJQOMDd32ag87yQ99XgbLgPqahPwUHMZQ=";
16 nativeBuildInputs = [ installShellFiles ];
18 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa AppKit ];
20 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit";
22 checkFlags = [ "--skip=help" "--skip=help_short" ];
29 installManPage doc/watchexec.1
30 installShellCompletion --zsh --name _watchexec completions/zsh
34 description = "Executes commands in response to file modifications";
35 homepage = "https://watchexec.github.io/";
36 license = with licenses; [ asl20 ];
37 maintainers = [ maintainers.michalrus ];
38 mainProgram = "watchexec";