{ description = "Lean 4 Example Project"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; lean4-nix = { url = "github:lenianiva/lean4-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs @ { nixpkgs, flake-parts, lean4-nix, ... }: flake-parts.lib.mkFlake {inherit inputs;} { systems = [ "aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" ]; perSystem = { system, pkgs, ... }: { _module.args.pkgs = import nixpkgs { inherit system; overlays = [(lean4-nix.readToolchainFile ./lean-toolchain)]; }; packages.default = (pkgs.lean.buildLeanPackage { name = "Example"; roots = ["Main"]; src = pkgs.lib.cleanSource ./.; }) .executable; devShells.default = pkgs.mkShell { packages = with pkgs.lean; [lean lean-all]; }; }; }; }