-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add nix flake #22
base: main
Are you sure you want to change the base?
Conversation
6632414
to
7b1f9cc
Compare
@@ -19,6 +19,7 @@ testing frameworks | |||
|
|||
namespace LSpec | |||
|
|||
open Lean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? I try to avoid opening namespaces like that. This file compiles just fine without this line
{ | ||
inputs = { | ||
lean = { | ||
url = "github:leanprover/lean4/v4.0.0-m5"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using leanprover/lean4:nightly-2022-08-09
in the lean-toolchain
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no tag for that release. You can ofc set it to the explicit git commit hash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we need to get the git commit hash of the Lean 4 version every time we do a toolchain bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, idk how lake fetches the data. It is probably possible to tie into that with nix as well.
Is there any update to this? The lean = {
url = "github:leanprover/lean4?ref=v4.4.0";
}; as a flake input |
Update: Lean's official flake build is deprecated leanprover/lean4#4895 I might create a Lean4 nix repo sometimes later to replace this, but I don't think having the user handle the build themselves is very difficult, e.g. lspecLib = leanPkgs.buildLeanPackage {
name = "LSpec";
roots = [ "Main" "LSpec" ];
src = "${lspec}";
};
test = leanPkgs.buildLeanPackage {
name = "Test";
roots = [ "Test.Main" ];
deps = [ lspecLib repl ];
src = pkgs.lib.cleanSource (pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
!(pkgs.lib.hasInfix "Pantograph" path);
});
}; |
Add a nix flake build to this repo