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

39 lines
891 B
Nix
Raw Normal View History

2021-09-19 01:57:22 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, libclang
2021-11-05 02:37:55 +00:00
, stdenv
, Security
2021-09-19 01:57:22 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-spellcheck";
2021-12-27 16:22:50 +00:00
version = "0.9.6";
2021-09-19 01:57:22 +00:00
src = fetchFromGitHub {
owner = "drahnr";
repo = pname;
rev = "v${version}";
2021-12-27 16:22:50 +00:00
sha256 = "0brrpcnsphvl1qn8myrzan0k87ph629gcj6zd54ym9f67qg2nri1";
2021-09-19 01:57:22 +00:00
};
2021-12-27 16:22:50 +00:00
cargoSha256 = "0d0adpgf0j8xvw0dm3gcd6lnksn6p5rz3limc038fg8k84zf7cdb";
2021-09-19 01:57:22 +00:00
2021-11-05 02:37:55 +00:00
buildInputs = lib.optional stdenv.isDarwin Security;
2021-09-19 01:57:22 +00:00
LIBCLANG_PATH = "${libclang.lib}/lib";
2021-12-27 16:22:50 +00:00
preCheck = "HOME=$(mktemp -d)";
2021-09-19 01:57:22 +00:00
checkFlags = [
"--skip checker::hunspell::tests::hunspell_binding_is_sane"
];
meta = with lib; {
description = "Checks rust documentation for spelling and grammar mistakes";
homepage = "https://github.com/drahnr/cargo-spellcheck";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ newam ];
};
}