1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 versionCheckHook,
6 nix-update-script,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "typos";
11 version = "1.34.0";
12
13 src = fetchFromGitHub {
14 owner = "crate-ci";
15 repo = "typos";
16 tag = "v${version}";
17 hash = "sha256-fQFCjeqk7IGObusFpT19fxaZvbt9KNLtecgNPirwhhU=";
18 };
19
20 cargoHash = "sha256-6MKlpKBmA/y2cSs2bRqwZs4K/duPurlUDLw9uBdWpUs=";
21
22 passthru.updateScript = nix-update-script { };
23
24 nativeInstallCheckInputs = [ versionCheckHook ];
25 doInstallCheck = true;
26 versionCheckProgramArg = "--version";
27
28 meta = {
29 description = "Source code spell checker";
30 mainProgram = "typos";
31 homepage = "https://github.com/crate-ci/typos";
32 changelog = "https://github.com/crate-ci/typos/blob/v${version}/CHANGELOG.md";
33 license = with lib.licenses; [
34 asl20 # or
35 mit
36 ];
37 maintainers = with lib.maintainers; [
38 figsoda
39 mgttlinger
40 ];
41 };
42}