9 rustPlatform.buildRustPackage rec {
10 pname = "cargo-watch";
13 src = fetchFromGitHub {
17 hash = "sha256-Vf6BFr8MphaUJoHMtksbbVQb+jha7jowhktQCVFxlxQ=";
20 cargoHash = "sha256-skUG1B6TCFEXeQSRwA6vWjXmNifk5bTR4+JESw7CZMo=";
22 buildInputs = lib.optionals stdenv.isDarwin [ Foundation Cocoa ];
24 NIX_LDFLAGS = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-framework" "AppKit" ];
26 # `test with_cargo` tries to call cargo-watch as a cargo subcommand
27 # (calling cargo-watch with command `cargo watch`)
29 export PATH="$(pwd)/target/${stdenv.hostPlatform.rust.rustcTarget}/release:$PATH"
33 description = "A Cargo subcommand for watching over Cargo project's source";
34 mainProgram = "cargo-watch";
35 homepage = "https://github.com/watchexec/cargo-watch";
36 license = licenses.cc0;
37 maintainers = with maintainers; [ xrelkd ivan matthiasbeyer ];