diff options
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; - }; + }); }; } |
