depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

38 lines
982 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-spellcheck";
version = "0.12.4";
src = fetchFromGitHub {
owner = "drahnr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-h9114HFWIsJn95pJ3QoDokNgAkE6KFjDt5Rt85vT7zw=";
};
cargoSha256 = "sha256-hYCDpSKi7HlqwdnMnfnKw46VpO+bhsV11kIu/4yMaBw=";
nativeBuildInputs = [ rustPlatform.bindgenHook ];
buildInputs = lib.optional stdenv.isDarwin Security;
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 ];
};
}