{ inputs.nixpkgs.url = "github:nixos/nixpkgs"; outputs = { self, nixpkgs, }: let systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "armv6l-linux" "armv7l-linux" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems f; in { packages = forAllSystems ( system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.stdenv.mkDerivation { pname = "resume"; version = "typst"; src = ./.; nativeBuildInputs = with pkgs; [ typst raleway ]; buildPhase = '' runHook preBuild mkdir $out export TYPST_FONT_PATHS=${pkgs.raleway}/share/fonts typst compile resume.typ $out/resume.pdf typst compile resume.typ $out/resume.png cp resume.typ $out/resume.typ runHook postBuild ''; }; } ); devShells = forAllSystems ( system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ typst raleway ]; shellHook = '' export TYPST_FONT_PATHS=${pkgs.raleway}/share/fonts ''; }; } ); }; }