nixpkgs/pkgs/tools/misc/watchexec/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.0 KiB
Nix
Raw Normal View History

2022-07-23 04:20:00 +00:00
{ lib, stdenv, rustPlatform, fetchFromGitHub, Cocoa, AppKit, installShellFiles }:
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";
2023-04-07 02:19:00 +00:00
version = "1.22.2";
2018-02-18 11:46:24 +00:00
src = fetchFromGitHub {
2019-05-29 07:36:29 +00:00
owner = pname;
repo = pname;
2023-03-15 19:45:13 +00:00
rev = "v${version}";
2023-04-07 02:19:00 +00:00
sha256 = "sha256-dO1vIzjsBrrMQ0H3Yv4X5rYPlCrWSlPbFmyooaODPeo=";
2018-02-18 11:46:24 +00:00
};
2023-04-07 02:19:00 +00:00
cargoHash = "sha256-6bLY9m6g7hSlYI3KrLS3fN4ATRkkbtq3Wf5xqS1G30s=";
2019-11-19 09:20:00 +00:00
nativeBuildInputs = [ installShellFiles ];
2018-02-18 11:46:24 +00:00
2022-07-23 04:20:00 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ Cocoa AppKit ];
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit";
2018-10-27 16:32:39 +00:00
checkFlags = [ "--skip=help" "--skip=help_short" ];
2023-03-15 19:45:13 +00:00
postPatch = ''
rm .cargo/config
'';
2019-11-19 09:20:00 +00:00
postInstall = ''
installManPage doc/watchexec.1
installShellCompletion --zsh --name _watchexec completions/zsh
'';
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 ];
};
}