-
Notifications
You must be signed in to change notification settings - Fork 35
/
lakefile.lean
57 lines (42 loc) · 1.7 KB
/
lakefile.lean
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
51
52
53
54
55
56
57
import Lake
open Lake DSL
-- Using this assumes that each dependency has a tag of the form `v4.X.0`.
def leanVersion : String := s!"v{Lean.versionString}"
def LocalGameServer : Dependency := {
name := `GameServer
src := Source.path "../lean4game/server"
}
def RemoteGameServer : Dependency := {
name := `GameServer
-- TODO: change back to stable version
src := Source.git "https://github.com/leanprover-community/lean4game.git" leanVersion "server"
}
/- Choose GameServer dependency depending on the environment variable `LEAN4GAME`. -/
open Lean in
#eval (do
let gameServerName := if get_config? lean4game.local |>.isSome then
``LocalGameServer else ``RemoteGameServer
modifyEnv (fun env => Lake.packageDepAttr.ext.addEntry env gameServerName)
: Elab.Command.CommandElabM Unit)
/-! # USER SECTION
Below are all the dependencies the game needs. Add or remove packages here as you need them.
Note: If your package (like `mathlib` or `Std`) has tags of the form `v4.X.0` then
you can use `require mathlib from git "[URL]" @ leanVersion`
-/
require mathlib from git "https://github.com/leanprover-community/mathlib4.git" @ leanVersion
/-! # END USER SECTION -/
-- NOTE: We abuse the `trace.debug` option to toggle messages in VSCode on and
-- off when calling `lake build`. Ideally there would be a better way using `logInfo` and
-- an option like `lean4game.verbose`.
package Game where
moreLeanArgs := #[
"-Dtactic.hygienic=false",
"-Dlinter.unusedVariables.funArgs=false",
"-Dtrace.debug=false"]
moreServerOptions := #[
⟨`tactic.hygienic, false⟩,
⟨`linter.unusedVariables.funArgs, true⟩,
⟨`trace.debug, true⟩]
weakLeanArgs := #[]
@[default_target]
lean_lib Game