linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / tools / misc / watchexec / default.nix
blob5a264db2d4d2bec2f5b06afefccb76ff65a2c549
1 { lib, stdenv, rustPlatform, fetchFromGitHub, CoreServices, installShellFiles, libiconv }:
3 rustPlatform.buildRustPackage rec {
4   pname = "watchexec";
5   version = "1.15.0";
7   src = fetchFromGitHub {
8     owner = pname;
9     repo = pname;
10     rev = version;
11     sha256 = "1b0ds04q4g8xcgwkziwb5hsi7v73w9y0prvhxz880zzh930652n2";
12   };
14   cargoSha256 = "0jpfgyz5l4fdb5cnqmadzjzrvc6dwgray4b0mx80pghpjw8a8qfb";
16   nativeBuildInputs = [ installShellFiles ];
18   buildInputs = lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
20   postInstall = ''
21     installManPage doc/watchexec.1
22     installShellCompletion --zsh --name _watchexec completions/zsh
23   '';
25   meta = with lib; {
26     description = "Executes commands in response to file modifications";
27     homepage = "https://github.com/watchexec/watchexec";
28     license = with licenses; [ asl20 ];
29     maintainers = [ maintainers.michalrus ];
30   };