{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; pre-commit-hooks.inputs.nixpkgs-stable.follows = "nixpkgs"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; }; outputs = inputs: let inherit (inputs.nixpkgs) lib; forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f rec { inherit system; pkgs = inputs.nixpkgs.legacyPackages.${system}; }); in { # nix -L build .#hello packages = forAllSystems ({ pkgs, ... }: pkgs); # nix -L develop or direnv allow devShell = forAllSystems ({ pkgs, system, ... }: pkgs.mkShell { name = "shell"; src = null; buildInputs = [ pkgs.fontconfig pkgs.gitFull pkgs.jq pkgs.pandoc pkgs.reuse pkgs.shellcheck (pkgs.texlive.combine { inherit (pkgs.texlive) scheme-basic collection-fontsrecommended collection-langfrench collection-latexrecommended collection-luatex environ tcolorbox titling; } ) ]; inherit (inputs.self.checks.${system}.pre-commit-check) shellHook; FONTCONFIG_FILE = pkgs.makeFontsConf { fontDirectories = [ pkgs.dejavu_fonts pkgs.freefont_ttf pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts pkgs.hack-font pkgs.liberation_ttf pkgs.lmodern pkgs.noto-fonts-emoji pkgs.unifont ]; }; }); # nix flake check checks = forAllSystems (args: with args; { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { src = inputs.self; hooks = { nixpkgs-fmt.enable = true; }; }; }); }; }