about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/cargo-spellcheck')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix
new file mode 100644
index 000000000000..23de1bc2a070
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-spellcheck/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, stdenv
+, Security
+, SystemConfiguration
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "cargo-spellcheck";
+  version = "0.13.2";
+
+  src = fetchFromGitHub {
+    owner = "drahnr";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-PgV+sjCf4O24v0i9P7RJIcn28OWMUcPSwy+P5n8RwS4=";
+  };
+
+  cargoHash = "sha256-6dhM+FzuLtKtRp2mpE9nlpT+0PBcgGqvBa9vqs6Rs7s=";
+
+  nativeBuildInputs = [ rustPlatform.bindgenHook ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
+
+  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";
+    mainProgram = "cargo-spellcheck";
+    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 matthiasbeyer ];
+  };
+}