3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/cargo-watch/default.nix

31 lines
954 B
Nix
Raw Normal View History

2021-05-05 05:20:00 +01:00
{ stdenv, lib, rustPlatform, fetchFromGitHub, CoreServices, rust, libiconv }:
2019-08-31 07:47:01 +01:00
rustPlatform.buildRustPackage rec {
pname = "cargo-watch";
2021-07-19 23:46:18 +01:00
version = "7.8.1";
2019-08-31 07:47:01 +01:00
src = fetchFromGitHub {
owner = "passcod";
repo = pname;
rev = "v${version}";
2021-07-19 23:46:18 +01:00
sha256 = "sha256-g6k/7jo8pvTn5snU05uSGzprNMt8/x+bJsLb/y0jHRg=";
2019-08-31 07:47:01 +01:00
};
2021-07-19 23:46:18 +01:00
cargoSha256 = "sha256-pfjWTkDw4D7eMADkPX01vapka8I6o0ZvkNjQt5X2pUk=";
2019-08-31 07:47:01 +01:00
2021-05-05 05:20:00 +01:00
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
2019-09-01 10:40:13 +01:00
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`)
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";
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
};
}