blob: ac2e3a446979717049edacbf757acf685bf510c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{
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];
};
};
};
}
|