Unverified Commit 26f520f9 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

typst: 0.11.1 -> 0.12.0 (#349652)

parents a263951e 453c8177
Loading
Loading
Loading
Loading
+812 −609

File changed.

Preview size limit exceeded, changes collapsed.

+37 −26
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, pkg-config
, openssl
, xz
, stdenv
, darwin
, nix-update-script
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  installShellFiles,
  pkg-config,
  openssl,
  xz,
  stdenv,
  darwin,
  nix-update-script,
  versionCheckHook,
}:

rustPlatform.buildRustPackage rec {
  pname = "typst";
  version = "0.11.1";
  version = "0.12.0";

  src = fetchFromGitHub {
    owner = "typst";
    repo = "typst";
    rev = "v${version}";
    hash = "sha256-FagjVU8BJZStE/geexZERuV2P28iF/pPn2mTi1Gu9iU=";
    rev = "refs/tags/v${version}";
    hash = "sha256-OfTMJ7ylVOJjL295W3Flj2upTiUQXmfkyDFSE1v8+a4=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "typst-dev-assets-0.11.1" = "sha256-SMRtitDHFpdMEoOuPBnC3RBTyZ96hb4KmMSCXpAyKfU=";
      "typst-dev-assets-0.12.0" = "sha256-YLxLuhpAUzktjyprZAhZ4GjcXEDUDdLtSzc5onzLuto=";
    };
  };

@@ -33,10 +35,12 @@ rustPlatform.buildRustPackage rec {
    pkg-config
  ];

  buildInputs = [
  buildInputs =
    [
      openssl
      xz
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      darwin.apple_sdk.frameworks.CoreFoundation
      darwin.apple_sdk.frameworks.CoreServices
      darwin.apple_sdk.frameworks.Security
@@ -51,9 +55,6 @@ rustPlatform.buildRustPackage rec {
    # Fix for "Found argument '--test-threads' which wasn't expected, or isn't valid in this context"
    substituteInPlace tests/src/tests.rs --replace-fail 'ARGS.num_threads' 'ARGS.test_threads'
    substituteInPlace tests/src/args.rs --replace-fail 'num_threads' 'test_threads'

    # Fix build with Rust 1.80; remove on next release
    ln -sf ${./Cargo.lock} Cargo.lock
  '';

  postInstall = ''
@@ -65,6 +66,12 @@ rustPlatform.buildRustPackage rec {

  cargoTestFlags = [ "--workspace" ];

  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  versionCheckProgramArg = [ "--version" ];
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = {
@@ -73,6 +80,10 @@ rustPlatform.buildRustPackage rec {
    homepage = "https://github.com/typst/typst";
    license = lib.licenses.asl20;
    mainProgram = "typst";
    maintainers = with lib.maintainers; [ drupol figsoda kanashimia ];
    maintainers = with lib.maintainers; [
      drupol
      figsoda
      kanashimia
    ];
  };
}