depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix
Default email a425ba4985 Project import generated by Copybara.
GitOrigin-RevId: 5b091d4fbe3b7b7493c3b46fe0842e4b30ea24b3
2021-12-30 14:39:12 +01:00

38 lines
891 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, libclang
, stdenv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-spellcheck";
version = "0.9.6";
src = fetchFromGitHub {
owner = "drahnr";
repo = pname;
rev = "v${version}";
sha256 = "0brrpcnsphvl1qn8myrzan0k87ph629gcj6zd54ym9f67qg2nri1";
};
cargoSha256 = "0d0adpgf0j8xvw0dm3gcd6lnksn6p5rz3limc038fg8k84zf7cdb";
buildInputs = lib.optional stdenv.isDarwin Security;
LIBCLANG_PATH = "${libclang.lib}/lib";
preCheck = "HOME=$(mktemp -d)";
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 ];
};
}