From 710f36df89d5639171b7b5dddc437090e1bc051b Mon Sep 17 00:00:00 2001 From: Maxwell Beck Date: Thu, 16 Jul 2026 18:44:41 -0500 Subject: Modular boilerplate + MIT license --- flake.nix | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'flake.nix') 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; - }; + }); }; } -- cgit v1.3.1