{ lib, rustPlatform, fetchFromGitHub, nix-update-script, versionCheckHook, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "typstyle"; version = "0.13.17"; src = fetchFromGitHub { owner = "typstyle-rs"; repo = "typstyle"; tag = "v${finalAttrs.version}"; hash = "sha256-JsRMs6ARiXs/S/ybkzNo4giR3BvGbOm8X/UH08kvznU="; }; cargoHash = "sha256-G7X5FoWHEWFoLqfHmbuSylG7/xp4aXrSugnGc20oZcE="; # Disabling tests requiring network access checkFlags = [ "--skip=e2e" ]; nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgramArg = "--version"; doInstallCheck = true; passthru = { updateScript = nix-update-script { }; }; meta = { changelog = "https://github.com/typstyle-rs/typstyle/blob/${finalAttrs.src.tag}/CHANGELOG.md"; description = "Format your typst source code"; homepage = "https://github.com/typstyle-rs/typstyle"; license = lib.licenses.asl20; mainProgram = "typstyle"; maintainers = with lib.maintainers; [ prince213 ]; }; })