From 9bdbfb1b76744a643ea8bc37b371444c10299ae0 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 7 Jun 2023 19:25:35 -0400 Subject: [PATCH] typst-live: init at unstable-2023-05-27 https://github.com/ItsEthra/typst-live --- pkgs/tools/typesetting/typst-live/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/tools/typesetting/typst-live/default.nix diff --git a/pkgs/tools/typesetting/typst-live/default.nix b/pkgs/tools/typesetting/typst-live/default.nix new file mode 100644 index 000000000000..f9d0e2cd18c7 --- /dev/null +++ b/pkgs/tools/typesetting/typst-live/default.nix @@ -0,0 +1,42 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +, darwin +, makeWrapper +, typst +}: + +rustPlatform.buildRustPackage { + pname = "typst-live"; + version = "unstable-2023-05-27"; + + src = fetchFromGitHub { + owner = "ItsEthra"; + repo = "typst-live"; + rev = "10a2da57b93f8d6e4eaa0bfcec1e68e46b916868"; + hash = "sha256-42QzqbyIjPn0C4coCU81gtlI7v5XJStlsDZvnLlwpYs="; + }; + + cargoHash = "sha256-M5jYSLw5oquAq2gGWZOJvx5/CGAl2Rg+G94V6ivAOzc="; + + nativeBuildInputs = [ + makeWrapper + ]; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + ]; + + postInstall = '' + wrapProgram $out/bin/typst-live \ + --suffix PATH : ${lib.makeBinPath [ typst ]} + ''; + + meta = with lib; { + description = "Hot reloading for your typst files"; + homepage = "https://github.com/ItsEthra/typst-live"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 177d3eeea3e9..a071d2033c7a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13393,6 +13393,8 @@ with pkgs; typst-fmt = callPackage ../tools/typesetting/typst-fmt { }; + typst-live = callPackage ../tools/typesetting/typst-live { }; + tz = callPackage ../tools/misc/tz { }; u9fs = callPackage ../servers/u9fs { };