Zulip Chat Archive

Stream: general

Topic: NixOS and Lean


Johan Commelin (Aug 19 2020 at 17:34):

I'm trying out NixOS. What is the recommended way to install VSCode + lean extension (these things try to auto-update, not sure if that plays nice with the nix philosophy)
Similar question for elan. Please share your observations / derivations.

cc: @Gabriel Ebner @Yury G. Kudryashov

Yury G. Kudryashov (Aug 19 2020 at 17:47):

I don't use vscode. I installed elan from nixpkgs; it downloads lean binaries.

Adam Topaz (Aug 19 2020 at 17:51):

If you do end up using emacs, the nixos guide is pretty good about explaining the "Nix" way to install emacs packages. (Disclaimer: I haven't used nixos in about 6 months.)

Chris B (Aug 19 2020 at 18:09):

I think @Sebastian Ullrich is also a nix guy, so he might have some sage advice.

Gabriel Ebner (Aug 19 2020 at 19:07):

We have elan and vscode packages in nixpkgs. Check the leanproject readme for how to install it mutably. (Now that leanproject development has settled, we should probably add a package to nixpkgs. But quickly the 20.09 freeze is coming..)

Gabriel Ebner (Aug 19 2020 at 19:08):

I believe we have a declarative way to install vscode extensions using vscode-with-extensions, but I've never used it: https://nixos.wiki/wiki/Vscode
I just use the extension manager in vscode.

Iocta (Aug 20 2020 at 02:22):

I'm curious if anybody's been able to compile mathlib.

Mario Carneiro (Aug 20 2020 at 02:26):

CI has

Mario Carneiro (Aug 20 2020 at 02:26):

I haven't compiled mathlib in a long time

Jannis Limperg (Aug 20 2020 at 10:32):

As soon as you have elan, compiling mathlib should be just leanpkg build. I do this regularly (not on Nix, but if Nix can install elan, you should be good).

Johan Commelin (Aug 20 2020 at 10:39):

Thanks for all the responses. I'm going to try this soon!

Johan Commelin (Aug 24 2020 at 09:30):

I've got elan and VScode running. Thanks for the help!

Johan Commelin (Aug 24 2020 at 09:31):

It seems that installing python packages is quite messy on NixOS. @Gabriel Ebner @Yury G. Kudryashov do you have a recommended way of installing leanproject?

Gabriel Ebner (Aug 24 2020 at 09:31):

What is the official name for the leanproject package these days? leanproject, mathlib-tools, mathlibtools?
cc @Patrick Massot

Patrick Massot (Aug 24 2020 at 09:31):

mathlibtools

Patrick Massot (Aug 24 2020 at 09:32):

pip won't allow a dash in a package name.

Gabriel Ebner (Aug 24 2020 at 09:32):

This is what I've been using:

nix-env -if https://github.com/leanprover-community/mathlib-tools/archive/master.tar.gz

Johan Commelin (Aug 24 2020 at 09:32):

https://pypi.org/project/mathlibtools/

Gabriel Ebner (Aug 24 2020 at 09:32):

But we might want to get it into nixpkgs.

Johan Commelin (Aug 24 2020 at 09:32):

Sounds good

Patrick Massot (Aug 24 2020 at 09:32):

I don't insist on any name here, they are all historical accidents.

Patrick Massot (Aug 24 2020 at 09:33):

And I'm sorry the current names are confusing.

Gabriel Ebner (Aug 29 2020 at 15:59):

https://github.com/NixOS/nixpkgs/pull/96608

Johan Commelin (Aug 29 2020 at 16:24):

Cool! You already merged it :grinning_face_with_smiling_eyes:
Thanks @Gabriel Ebner


Last updated: Dec 20 2023 at 11:08 UTC