{ lib, rustPlatform, fetchFromGitHub, versionCheckHook, nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "typos"; version = "1.34.0"; src = fetchFromGitHub { owner = "crate-ci"; repo = "typos"; tag = "v${version}"; hash = "sha256-fQFCjeqk7IGObusFpT19fxaZvbt9KNLtecgNPirwhhU="; }; cargoHash = "sha256-6MKlpKBmA/y2cSs2bRqwZs4K/duPurlUDLw9uBdWpUs="; passthru.updateScript = nix-update-script { }; 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; [ figsoda mgttlinger ]; }; }