Files
nixpkgs/pkgs/by-name/ty/typstyle/package.nix
2026-08-02 08:55:34 +02:00

49 lines
1.0 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "typstyle";
version = "0.15.1";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "typstyle-rs";
repo = "typstyle";
tag = "v${finalAttrs.version}";
hash = "sha256-eqE3iHbzu5FBOmf4zZ0NMnvypYOHHoj/8FJBK5t5znQ=";
};
cargoHash = "sha256-YiQJP+YxSBnMIZvu3dN2CZrz8APMRBJHxZp/Kx+5nfE=";
# 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
];
};
})