nixpkgs/pkgs/development/tools/rust/cargo-watch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
977 B
Nix
Raw Normal View History

2021-08-13 20:57:08 +00:00
{ stdenv, lib, rustPlatform, fetchFromGitHub, CoreServices, Foundation, rust, libiconv }:
2019-08-31 06:47:01 +00:00
rustPlatform.buildRustPackage rec {
pname = "cargo-watch";
2021-12-06 08:04:37 +00:00
version = "8.1.2";
2019-08-31 06:47:01 +00:00
src = fetchFromGitHub {
owner = "passcod";
repo = pname;
rev = "v${version}";
2021-12-06 08:04:37 +00:00
sha256 = "sha256-zhOYKvsCK5am4Ystt3+cPAQM77IlIBJysAEix5cXKbI=";
2019-08-31 06:47:01 +00:00
};
2021-12-06 08:04:37 +00:00
cargoSha256 = "sha256-OAOzrGS8n0jfUiQyIAHWLJMEkRINyasgkIjiLw977LE=";
2019-08-31 06:47:01 +00:00
2021-08-13 20:57:08 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Foundation libiconv ];
2019-09-01 09:40:13 +00:00
2019-08-31 06:47:01 +00: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 06:47:01 +00: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 06:47:01 +00:00
license = licenses.cc0;
2019-09-01 09:40:13 +00:00
maintainers = with maintainers; [ xrelkd ivan ];
2019-08-31 06:47:01 +00:00
};
}