Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, stdenv
5, Security
6, SystemConfiguration
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "cargo-spellcheck";
11 version = "0.14.0";
12
13 src = fetchFromGitHub {
14 owner = "drahnr";
15 repo = pname;
16 rev = "v${version}";
17 hash = "sha256-NrtPV2bd9BuA1nnniIcth85gJQmFGy9LHdajqmW8j4Q=";
18 };
19
20 cargoHash = "sha256-mxx4G77ldPfVorNa1LGTcA0Idwmrcl8S/ze+UUoLHhI=";
21
22 nativeBuildInputs = [ rustPlatform.bindgenHook ];
23
24 buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
25
26 preCheck = "HOME=$(mktemp -d)";
27
28 checkFlags = [
29 "--skip checker::hunspell::tests::hunspell_binding_is_sane"
30 ];
31
32 meta = with lib; {
33 description = "Checks rust documentation for spelling and grammar mistakes";
34 mainProgram = "cargo-spellcheck";
35 homepage = "https://github.com/drahnr/cargo-spellcheck";
36 changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${version}/CHANGELOG.md";
37 license = with licenses; [ asl20 /* or */ mit ];
38 maintainers = with maintainers; [ newam matthiasbeyer ];
39 };
40}