leanPackages: structural reimagining — own toolchain, lake --packages, Hydra visibility

Give leanPackages its own lean4, independent of pkgs.lean4. Binary-
patch the toolchain so the language server discovers the wrapped lake
despite lake serve deriving LAKE from IO.appPath unconditionally.
Supplant Lake's config trace validation for /nix/store/ dependencies,
deferring cache coherence to Nix.

Migrate Nix-managed dependency injection from package-overrides.json
to lake --packages. Patch Cli to pre-build static library for
downstream executables. Add recurseIntoAttrs for Hydra.

Upstream accepted FetchContent for mimalloc vendoring:
https://github.com/leanprover/lean4/commit/a145b9c11a0fe38fd4c921024a7376c99cc34bd2
This commit is contained in:
Nadja Yang
2026-03-28 13:53:22 -04:00
parent 81b7eb12a4
commit 3c2a3b804d
18 changed files with 274 additions and 267 deletions
@@ -8,19 +8,18 @@
}:
let
version = "0.0.95";
src = fetchFromGitHub {
owner = "leanprover-community";
repo = "ProofWidgets4";
tag = "v0.0.87";
hash = "sha256-qXEqNfwUBPnxAtLRkBZTBFhrM4JYl43gLo/PM6HOG7o=";
tag = "v${version}";
hash = "sha256-LETljr+QEU6CxprR3pB4hUzhgCD8PrIuiPOgTIdhHVM=";
};
in
buildLakePackage {
pname = "lean4-proofwidgets";
version = "0.0.87";
inherit src;
inherit version src;
leanPackageName = "proofwidgets";
@@ -38,7 +37,7 @@ buildLakePackage {
name = "lean4-proofwidgets-npm-deps";
inherit src;
sourceRoot = "source/widget";
hash = "sha256-CzBRrreOSytquZ/xFHPlY8r+lz5Bg9Zk9ienRhc8SiY=";
hash = "sha256-ShH6MDr76wzWQrJvhMWCnklaox/uRsfoe+aYVSo/eNA=";
};
npmRoot = "widget";