-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: lake build: add --system-packages
flag to use system package manager
#5122
Comments
--system-packages
flag to use system package manager
This sounds like a good idea to me! 😃 |
The idea is that `elan` should be used to install `lean` rather than directly using Nix, because of issues with packaging `mathlib` such as discussed here: leanprover/lean4#5122. Based on `nix flake init -t templates#utils-generic`.
The idea is that `elan` should be used to install `lean` rather than directly using Nix, because of issues with packaging `mathlib` such as discussed here: leanprover/lean4#5122. Based on `nix flake init -t templates#utils-generic`.
The idea is that `elan` should be used to install `lean` rather than directly using Nix, because of issues with packaging `mathlib` such as discussed here: leanprover/lean4#5122. Based on `nix flake init -t templates#utils-generic`.
The idea is that `elan` should be used to install `lean` rather than directly using Nix, because of issues with packaging `mathlib` such as discussed here: leanprover/lean4#5122. Based on `nix flake init -t templates#utils-generic`.
The idea is that `elan` should be used to install `lean` rather than directly using Nix, because of issues with packaging `mathlib` such as discussed here: leanprover/lean4#5122.
Hello @Coda-Coda @a2379 , has this been fixed? |
No, it is also currently not recommended to package Lean with a system package manager as libraries currently rely on very specific releases and are often not forward or backward compatible. For example if you install Lean version 4.x and then work on a mathlib checkout that relies on 4.y you are just going to get lots of weird errors. |
I see, that makes sense, but in a transactional package management/distribution setting like Guix or Nix, the curl method doesn't work because it demands write access to read-only directories such as |
Sure, but that is not what the original issue is referencing. Lake should support installing both Lean and Lean libraries through the system package manager. Version mismatches would not be an issue, because package maintainers are used to updating programs and their dependencies in lockstep. |
@hargoniX and other maintainers, at least you might guide us on how this might be implemented in a PR? Because without this, mathlib et.al simply would be unusable in distros such as Guix. |
I believe there is on the roadmap the ability to vendor the dependencies, and then build without network access. This would presumably already help a bunch for your use case? (Can't comment on timelines or precise form of the feature.) |
Indeed, that would be all we need. |
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 forlake build
to either:$LEAN_PATH
or some other method)lake
to use at build-timeNotes:
.olean
/.lean
files, and not require the original code orlakefile.lean
for dependencies. Not a big deal if this isn't possible.Community Feedback
The system package manager problem was mentioned here, although the issue itself was for a different idea:
#3193 (comment)
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 packagemathlib
because lake keeps trying togit fetch
the dependencies.The text was updated successfully, but these errors were encountered: