Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "7152850e7b216a0d409701617721b6e469d34bf6",
"rev": "b5b9e2bb45ce91e4bc44eaa738c3a8910404ab82",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "7152850e7b216a0d409701617721b6e469d34bf6",
"inputRev": "master",
"inherited": false,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/batteries.git",
"type": "git",
"subDir": null,
"scope": "",
"rev": "32dc18cde3684679f3c003de608743b57498c56f",
"rev": "e535e4feb0aa360e59e7adf4837b91ffbfb8c943",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "32dc18cde3684679f3c003de608743b57498c56f",
"inputRev": "main",
"inherited": false,
"configFile": "lakefile.toml"}],
"name": "LeanCopilot",
Expand Down
13 changes: 9 additions & 4 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ deriving Inhabited, BEq


def nproc : IO Nat := do
let cmd := if getOS! == .windows then "cmd" else "nproc"
let args := if getOS! == .windows then #["/c echo %NUMBER_OF_PROCESSORS%"] else #[]
let (cmd, args) :=
match getOS! with
| .windows => ("cmd", #["/c echo %NUMBER_OF_PROCESSORS%"])
| .macos => ("sysctl", #["-n", "hw.ncpu"])
| .linux => ("nproc", #[])
let out ← IO.Process.output {cmd := cmd, args := args, stdin := .null}
if out.exitCode != 0 then
return 4
return out.stdout.trimAscii.toNat!


Expand Down Expand Up @@ -422,8 +427,8 @@ extern_lib libleanffi pkg := do
buildStaticLib (pkg.sharedLibDir / name) #[ct2O]


require batteries from git "https://github.com/leanprover-community/batteries.git" @ "32dc18cde3684679f3c003de608743b57498c56f"
require aesop from git "https://github.com/leanprover-community/aesop" @ "7152850e7b216a0d409701617721b6e469d34bf6"
require batteries from git "https://github.com/leanprover-community/batteries.git" @ "main"
require aesop from git "https://github.com/leanprover-community/aesop" @ "master"

meta if get_config? env = some "dev" then -- dev is so not everyone has to build it
require «doc-gen4» from git "https://github.com/leanprover/doc-gen4" @ "main"
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.30.0
leanprover/lean4:v4.32.0-rc1
Loading