base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / ty / typstyle / package.nix
blob665bb01daf05fcdd2507d6ceb6b248c7ed171c6b
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   nix-update-script,
6   versionCheckHook,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "typstyle";
11   version = "0.12.1";
13   src = fetchFromGitHub {
14     owner = "Enter-tainer";
15     repo = "typstyle";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-liGGnaUhi3/d4SxpiG/P1wp89brqUJaLyo9/KJvPf9I=";
18   };
20   cargoLock = {
21     lockFile = ./Cargo.lock;
22     outputHashes = {
23       "reflexo-0.5.0-rc7" = "sha256-XjzHo9HprI1FVPDwNQ0Gw9iTXspo6PUsxz3BOd6qkL0=";
24     };
25   };
27   # Disabling tests requiring network access
28   checkFlags = [
29     "--skip=e2e"
30   ];
32   nativeInstallCheckInputs = [
33     versionCheckHook
34   ];
35   versionCheckProgramArg = [ "--version" ];
36   doInstallCheck = true;
38   passthru = {
39     updateScript = nix-update-script { };
40   };
42   meta = {
43     changelog = "https://github.com/Enter-tainer/typstyle/blob/${src.rev}/CHANGELOG.md";
44     description = "Format your typst source code";
45     homepage = "https://github.com/Enter-tainer/typstyle";
46     license = lib.licenses.asl20;
47     mainProgram = "typstyle";
48     maintainers = with lib.maintainers; [ drupol ];
49   };