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
988 B
Nix
Raw Normal View History

{ stdenv, lib, rustPlatform, fetchFromGitHub, Cocoa, CoreServices, Foundation, rust, libiconv }:
2019-08-31 06:47:01 +00:00
rustPlatform.buildRustPackage rec {
pname = "cargo-watch";
2023-02-21 14:34:16 +00:00
version = "8.4.0";
2019-08-31 06:47:01 +00:00
src = fetchFromGitHub {
owner = "watchexec";
2019-08-31 06:47:01 +00:00
repo = pname;
rev = "v${version}";
2023-02-21 14:34:16 +00:00
hash = "sha256-YwiTzIO60ct076vMoK9BHKa65Qet2PAvPRwnZcjDgcM=";
2019-08-31 06:47:01 +00:00
};
2023-02-21 14:34:16 +00:00
cargoHash = "sha256-BzcKWQSB94H3XOsbwNvJoAHlZwkJvLABIrfFh9Ugfig=";
2019-08-31 06:47:01 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ Cocoa 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
};
}