feat: Add copilot add script

This commit is contained in:
jstoobysmith 2024-05-21 07:48:06 -04:00
parent f340177137
commit 3bb69f939d
3 changed files with 38 additions and 7 deletions

14
scripts/add-copilot.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
cp ./scripts/copilot_lakefile.txt lakefile.lean
lake update LeanCopilot
lake exe LeanCopilot/download
lake build
echo ".........................................................................."
echo "Please do not push changes to the following files: lakefile.lean, .lake/lakefile.olean,
.lake/lakefile.olean.trace, lake-manifest.json."

View file

@ -0,0 +1,23 @@
import Lake
open Lake DSL
package «hep_lean» {
-- add any package configuration options here
}
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
@[default_target]
lean_lib «HepLean» {
-- add any library configuration options here
moreLinkArgs := #[
"-L./.lake/packages/LeanCopilot/.lake/build/lib",
"-lctranslate2"
]
}
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"
require LeanCopilot from git "https://github.com/lean-dojo/LeanCopilot.git" @ "v1.2.1"