summary refs log tree commit diff
path: root/pkgs/tools/typesetting/typst-fmt/default.nix
blob: 24bca427b6c955cb3f94b699bd103e77cf87eb30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
  pname = "typst-fmt";
  version = "unstable-2023-04-26";

  src = fetchFromGitHub {
    owner = "astrale-sharp";
    repo = pname;
    rev = "cb299645244551bfc91dc4579a2543a0d4cc84b0";
    hash = "sha256-/+m3HkOsBiOAhOqBfv+hPauvDKqfCrwOWGDtYfW5zJQ=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "typst-0.2.0" = "sha256-6Uezm3E/qGl9303auqjvfWe3KKsqwsHeXUrjWemjJKU=";
    };
  };

  checkFlags = [
    # test_eof is ignored upstream
    "--skip=rules::tests_typst_format::test_eof"
  ];

  meta = with lib; {
    description = "A formatter for the Typst language";
    homepage = "https://github.com/astrale-sharp/typst-fmt";
    license = licenses.mit;
    maintainers = with maintainers; [ geri1701 ];
  };
}