2021-09-22 15:38:15 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libclang
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
|
|
|
, Security
|
2021-09-22 15:38:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-spellcheck";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "0.11.2";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drahnr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-03 18:54:34 +00:00
|
|
|
sha256 = "sha256-ZiRa4XYnY4fwbMenRLnvFQms66tIyGbm5saK8gN39ag=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
cargoSha256 = "sha256-gWQbhFPdBDhPZY1LHxFlWO9xG4AXfyhZp0UnZ3Y86/Y=";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
LIBCLANG_PATH = "${libclang.lib}/lib";
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
preCheck = "HOME=$(mktemp -d)";
|
|
|
|
|
2021-09-22 15:38:15 +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";
|
2022-02-10 20:34:41 +00:00
|
|
|
changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${version}/CHANGELOG.md";
|
2021-09-22 15:38:15 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ newam ];
|
|
|
|
};
|
|
|
|
}
|