diff options
| author | Maxwell Beck <max@rastertail.net> | 2026-07-16 18:44:41 -0500 |
|---|---|---|
| committer | Maxwell Beck <max@rastertail.net> | 2026-07-16 18:44:41 -0500 |
| commit | 710f36df89d5639171b7b5dddc437090e1bc051b (patch) | |
| tree | 4f8842bb7b326c2a2f9cc3896a52ccd7ac180f88 /flake.nix | |
| parent | 9c78ec8e532b69ee643f9b4346187a67a797990c (diff) | |
Modular boilerplate + MIT license
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 34 |
1 files changed, 16 insertions, 18 deletions
@@ -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; - }; + }); }; } |
