leanprover / lean4

Lean 4 programming language and theorem prover
https://lean-lang.org
Apache License 2.0
4.69k stars 421 forks source link

RFC: lake build: add `--system-packages` flag to use system package manager #5122

Open a2379 opened 2 months ago

a2379 commented 2 months ago

Proposal

In order for lean libraries to be packaged for Linux distributions, they must be installable using the system package manager. The system package manager will use lake build for building individual projects, but will manage the dependencies without lake. There should be a way for lake build to either:

  1. build the project without considering dependencies (and assume they will be made available at runtime using $LEAN_PATH or some other method)
  2. specify one or more package directories on the command-line for lake to use at build-time

Notes:

Community Feedback

The system package manager problem was mentioned here, although the issue itself was for a different idea: https://github.com/leanprover/lean4/issues/3193#issuecomment-1898009228

Impact

The impact would be availability of Lean libraries on various Linux distributions.

I have Lean 4.10, batteries, and some other libraries packaged for Guix via a new lean-build-system. But I cannot package mathlib because lake keeps trying to git fetch the dependencies.

Coda-Coda commented 2 months ago

This sounds like a good idea to me! :smiley: