Skip to content

Commit

Permalink
Add support for Lean 4
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed Oct 11, 2024
1 parent ff07f4f commit 772b413
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ A dev template that's fully customizable.
- [tectonic]
- [texlab]

### [`lean4`](./lean4/)

- [Lean] 4.9.0

### [`nickel`](./nickel/)

- [Nickel] 0.2.0
Expand Down Expand Up @@ -372,6 +376,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[knitr]: https://yihui.org/knitr
[kotlin]: https://kotlinlang.org
[latex]: https://latex-project.org
[lean]: https://lean-lang.org
[lcov]: https://ltp.sourceforge.net/coverage/lcov.php
[leiningen]: https://leiningen.org
[levant]: https://github.com/hashicorp/levant
Expand Down
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@
description = "LaTeX development environment";
};

lean4 = {
path = ./lean4;
description = "Lean 4 development environment";
};

nickel = {
path = ./nickel;
description = "Nickel development environment";
Expand Down
1 change: 1 addition & 0 deletions lean4/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions lean4/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions lean4/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
description = "A Nix-flake-based Lean 4 development environment";

inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";

outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ lean4 ];
};
});
};
}

0 comments on commit 772b413

Please sign in to comment.