From 4f387146f58fee9fd7aafabdb378019ea1786bd8 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 22 Mar 2023 20:11:12 +0100 Subject: package typst --- pkgs/overlay.nix | 7 +++++++ pkgs/typst.nix | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/typst.nix (limited to 'pkgs') diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index ada5d47..75e8cfc 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -1,8 +1,10 @@ +{ inputs, ... }: self: super: { galmon-core = self.callPackage (import ./galmon.nix {}) {}; galmon-full = self.callPackage (import ./galmon.nix { buildAll = true; }) {}; + glitchtip = (self.callPackage ./glitchtip.nix { python = super.python310.override ({ packageOverrides = self: super: { @@ -10,4 +12,9 @@ self: super: }; }); }); + + typst = self.callPackage ./typst.nix { + craneLib = (inputs.crane.mkLib self).overrideToolchain + self.rust-bin.stable.latest.default; + }; } diff --git a/pkgs/typst.nix b/pkgs/typst.nix new file mode 100644 index 0000000..0290899 --- /dev/null +++ b/pkgs/typst.nix @@ -0,0 +1,18 @@ +{ craneLib, fetchFromGitHub, lib, git }: + +craneLib.buildPackage rec { + pname = "typst-cli"; + version = "22-03-21-2"; + + cargoExtraArgs = "-p typst-cli"; + src = fetchFromGitHub { + owner = "typst"; + repo = "typst"; + sha256 = "sha256-JvVuTOnonHWDkT2MSQUVUuL23dS7fRDzQhqLpHE9pZw="; + rev = version; + leaveDotGit = true; + }; + + # the build.rs script wants a version hash from git. + buildInputs = [ git ]; +} -- cgit v1.2.3