{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; pre-commit-hooks.url = "github:cachix/git-hooks.nix"; }; outputs = inputs @ {self, ...}: inputs.flake-parts.lib.mkFlake {inherit inputs;} { systems = ["x86_64-linux"]; perSystem = { pkgs, system, ... }: { packages.makeimg = pkgs.callPackage ./makeimg.nix {}; checks.pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { src = ./.; hooks.alejandra.enable = true; }; devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ self.packages.${system}.makeimg # tools just ]; shellHook = '' ${self.checks.${system}.pre-commit-check.shellHook} ''; }; }; }; }