write literate haskell programs in typst cdn.oppi.li/typst-unlit.pdf
haskell typst
at main 897 B view raw
1{ 2 inputs = { 3 nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 4 gitignore = { 5 url = "github:hercules-ci/gitignore.nix"; 6 inputs.nixpkgs.follows = "nixpkgs"; 7 }; 8 }; 9 10 outputs = { 11 self, 12 nixpkgs, 13 gitignore, 14 }: let 15 inherit (gitignore.lib) gitignoreSource; 16 supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; 17 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 18 nixpkgsFor = 19 forAllSystems (system: 20 import nixpkgs { 21 config.allowUnfree = true; 22 inherit system; 23 }); 24 in { 25 devShell = forAllSystems (system: let 26 pkgs = nixpkgsFor.${system}; 27 in 28 pkgs.mkShell { 29 nativeBuildInputs = [ 30 pkgs.typst 31 pkgs.ghc 32 pkgs.pandoc 33 ]; 34 }); 35 36 formatter = forAllSystems (system: nixpkgsFor.${system}.alejandra); 37 }; 38}