{ description = "books"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; pre-commit-hooks.inputs.nixpkgs.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 ]; inherit (inputs.self.checks.${system}.pre-commit-check) shellHook; } ); # nix flake check checks = forAllSystems ( args: with args; { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { src = inputs.self; hooks = { nixfmt-rfc-style.enable = true; }; }; } ); }; }