2020-07-04 22:01:07 +01:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, CoreServices, rust }:
|
2019-08-31 07:47:01 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-watch";
|
2020-07-04 22:01:07 +01:00
|
|
|
version = "7.5.0";
|
2019-08-31 07:47:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "passcod";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-07-04 22:01:07 +01:00
|
|
|
sha256 = "181v922nx8152ymszig1kw6y0mnix6si1zfnv6vqgr5r53pwkbc1";
|
2019-08-31 07:47:01 +01:00
|
|
|
};
|
|
|
|
|
2020-07-04 22:01:07 +01:00
|
|
|
cargoSha256 = "1abhzi1396x8lnxvakj34nysl3ybvsaf21j678wzaqwj16sd3w3d";
|
2019-08-31 07:47:01 +01:00
|
|
|
|
2019-09-01 10:40:13 +01:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin CoreServices;
|
|
|
|
|
2019-08-31 07:47:01 +01:00
|
|
|
# `test with_cargo` tries to call cargo-watch as a cargo subcommand
|
|
|
|
# (calling cargo-watch with command `cargo watch`)
|
2020-07-04 22:01:07 +01:00
|
|
|
preCheck = ''
|
|
|
|
export PATH="$(pwd)/target/${rust.toRustTarget stdenv.hostPlatform}/release:$PATH"
|
|
|
|
'';
|
2019-08-31 07:47:01 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Cargo subcommand for watching over Cargo project's source";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/passcod/cargo-watch";
|
2019-08-31 07:47:01 +01:00
|
|
|
license = licenses.cc0;
|
2019-09-01 10:40:13 +01:00
|
|
|
maintainers = with maintainers; [ xrelkd ivan ];
|
2019-08-31 07:47:01 +01:00
|
|
|
};
|
|
|
|
}
|