about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/watchexec/default.nix
blob: b0471e56c07871197caf68f172260ca01ab82789 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, darwin }:

rustPlatform.buildRustPackage rec {
  pname = "watchexec";
  version = "1.10.2";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = version;
    sha256 = "10h9g6r5zkm71zpr33imh49187xx1wcv9sw7bf5dllgnxabd0lql";
  };

  cargoSha256 = "1sqwplvpg0n9j0h9j94m7a6ylgqi4y4wyx489y09z9gm7aqgrsjc";

  buildInputs = stdenv.lib.optionals stdenv.isDarwin [
    CoreServices
    # This is needed to avoid an undefined symbol error "_CFURLResourceIsReachable"
    darwin.cf-private
  ];

  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;
  };
}