summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorMaxwell Beck <max@rastertail.net>2026-07-16 18:44:41 -0500
committerMaxwell Beck <max@rastertail.net>2026-07-16 18:44:41 -0500
commit710f36df89d5639171b7b5dddc437090e1bc051b (patch)
tree4f8842bb7b326c2a2f9cc3896a52ccd7ac180f88 /flake.nix
parent9c78ec8e532b69ee643f9b4346187a67a797990c (diff)
Modular boilerplate + MIT license
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix34
1 files changed, 16 insertions, 18 deletions
diff --git a/flake.nix b/flake.nix
index b4c5334..8820d6f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,25 +1,23 @@
{
- inputs = {
- nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
- };
+ inputs = { };
+
+ outputs = { self }: {
+ overlays.default = (self: pkgs: {
+ rastertype3 = pkgs.stdenvNoCC.mkDerivation rec {
+ pname = "rastertype3";
+ version = "0.1.0";
- outputs = { self, nixpkgs }: let
- system = "aarch64-darwin";
- pkgs = nixpkgs.legacyPackages.${system};
+ src = ./.;
- fonts = with pkgs; [ gyre-fonts ];
- in {
- devShells.${system} = rec {
- rastertype = pkgs.mkShell {
- packages = [ pkgs.typst ];
- shellHook = ''
- export TYPST_FONT_PATHS="${pkgs.symlinkJoin { name = "rastertype-fonts"; paths = fonts; }}/share/fonts"
- export TYPST_IGNORE_SYSTEM_FONTS=true
- export TYPST_IGNORE_EMBEDDED_FONTS=true
- export TYPST_FEATURES=html
+ propagatedBuildInputs = [ pkgs.typst pkgs.gyre-fonts ];
+ installPhase = ''
+ mkdir -p $out/typst/packages/local/rastertype3/${version}/
+ cp raster.typ $out/typst/packages/local/rastertype3/${version}/
+ cp typst.toml $out/typst/packages/local/rastertype3/${version}/
'';
+
+ setupHooks = [ ./setup-hook.sh ];
};
- default = rastertype;
- };
+ });
};
}