50 lines
1023 B
Nix
50 lines
1023 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "typos";
|
|
version = "1.39.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "crate-ci";
|
|
repo = "typos";
|
|
tag = "v${version}";
|
|
hash = "sha256-N8lz/PEGtqBHH9smUGoPghGEIGukrS/9POv+FAb8L/M=";
|
|
};
|
|
|
|
cargoHash = "sha256-+8RKFg8XFYgqso3lvqaKHi8O8dFU3ayEMdLgZytNZlY=";
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
preCheck = ''
|
|
export LC_ALL=C.UTF-8
|
|
'';
|
|
|
|
postCheck = ''
|
|
unset LC_ALL
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
doInstallCheck = true;
|
|
versionCheckProgramArg = "--version";
|
|
|
|
meta = {
|
|
description = "Source code spell checker";
|
|
mainProgram = "typos";
|
|
homepage = "https://github.com/crate-ci/typos";
|
|
changelog = "https://github.com/crate-ci/typos/blob/v${version}/CHANGELOG.md";
|
|
license = with lib.licenses; [
|
|
asl20 # or
|
|
mit
|
|
];
|
|
maintainers = with lib.maintainers; [
|
|
mgttlinger
|
|
];
|
|
};
|
|
}
|