2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, CoreServices, rust }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-watch";
|
2021-03-16 09:55:35 +00:00
|
|
|
version = "7.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "passcod";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-16 09:55:35 +00:00
|
|
|
sha256 = "sha256-Eqg+Ke5n2H6/bPd1W8HL4XLMfdV8ard4SDrCeK0MFOg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-16 09:55:35 +00:00
|
|
|
cargoSha256 = "sha256-s7ip+/1hZJ8dQGix6yI5fQ4gAw2nHU8+dxxYcVvyTAs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin CoreServices;
|
|
|
|
|
|
|
|
# `test with_cargo` tries to call cargo-watch as a cargo subcommand
|
|
|
|
# (calling cargo-watch with command `cargo watch`)
|
2020-07-18 16:06:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH="$(pwd)/target/${rust.toRustTarget stdenv.hostPlatform}/release:$PATH"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Cargo subcommand for watching over Cargo project's source";
|
|
|
|
homepage = "https://github.com/passcod/cargo-watch";
|
|
|
|
license = licenses.cc0;
|
|
|
|
maintainers = with maintainers; [ xrelkd ivan ];
|
|
|
|
};
|
|
|
|
}
|