{ lib, rustPlatform, fetchFromGitHub, nix-update-script, versionCheckHook, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "typstyle"; version = "0.14.4"; src = fetchFromGitHub { owner = "typstyle-rs"; repo = "typstyle"; tag = "v${finalAttrs.version}"; hash = "sha256-zDvO++UEA94Kdfu4/qCqfF6IgdCtpIjaVZjZdlkQgNw="; }; cargoHash = "sha256-9Z2l982ELoMOAzsFMhQzaXcb1vX8Y6aek0j/HbTzp38="; # Disabling tests requiring network access checkFlags = [ "--skip=e2e" ]; nativeInstallCheckInputs = [ versionCheckHook ]; 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 ]; }; })