summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorstuebinm2023-03-22 20:11:12 +0100
committerstuebinm2023-03-22 20:12:30 +0100
commit4f387146f58fee9fd7aafabdb378019ea1786bd8 (patch)
treee7a68aee98e2a0a05f25fa494f6f71ded1c8c6cb /pkgs
parent7c4ce3a545fb74ab1eb35c02de9ace3c3dbae2ef (diff)
package typst
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/overlay.nix7
-rw-r--r--pkgs/typst.nix18
2 files changed, 25 insertions, 0 deletions
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 ];
+}