depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

39 lines
982 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, libclang
, stdenv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-spellcheck";
version = "0.10.1";
src = fetchFromGitHub {
owner = "drahnr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-AKk25/j9Ao7ss8+2x+A5ohZ4P1wQ8uW5DVIBCHqFSPU=";
};
cargoSha256 = "sha256-6zTZXSW8poePNZy48F6u5tF1LEDQt4f9qv7W/pdIBbI=";
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";
changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${version}/CHANGELOG.md";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ newam ];
};
}