jupyenv icon indicating copy to clipboard operation
jupyenv copied to clipboard

Merging in Nixpkgs

Open guaraqe opened this issue 4 years ago • 15 comments

This issue will track the progress of the work for merging in Nixpkgs, announced here. I will do this here so that there is less noise in the Nixpkgs repo.

guaraqe avatar Feb 11 '20 10:02 guaraqe

Do we want to make jupyterWith a flake instead?

mboes avatar Feb 11 '20 11:02 mboes

I think there is not much reason for JupyterWith to not be in Nixpkgs. We made it outside of Nixpkgs because of technical reasons in the beginning, but I think the idea is mature enough now.

Also, we want it to be updated at the same rate as other packages in Nixpkgs. And since these dependencies are many and are not controlled by us, it will be easier if updates in Nixpkgs include tests for JupyterWith. This decentralizes work and relieves us of the update burden for multiple ecosystems we don't know well.

I think a Flake would be more adapted for the kind of LTS distribution of Jupyter + Data Science packages proposed by @MMesch.

guaraqe avatar Feb 11 '20 15:02 guaraqe

There are two main points to update in Nixpkgs:

  • pkgs/applications/editors/jupyter, which is strictly simpler than JupyterWith. This will be expanded a lot. The main difficulties are going to be the definition of overrides in a transparent way.
  • nixos/modules/services/development/jupyter, which defines the NixOS service. Everything here will have to be ported to the JupyterWith interface, but most of the code will stay the same.

guaraqe avatar Feb 11 '20 15:02 guaraqe

Interested in @edolstra's perspective on this one. @edolstra see discussion above.

mboes avatar Feb 14 '20 13:02 mboes

I have a version with both IPython and IHaskell working. Surprisingly, IHaskell was working in Nixpkgs, and I just had to mark it as not broken. I will proceed to the other kernels, and start thinking about the tests.

guaraqe avatar Feb 21 '20 13:02 guaraqe

Five kernels are building normally, three of them not:

  • iJavascript, seems to be a sandbox problem which we didn't see before
  • Juniper, it seems that it is not in rPackages anymore
  • Ansible, whose package does not build

I am ignoring Xeus for the moment, since it is much more complex than the others, and a problem in Nixpkgs by itself.

guaraqe avatar Feb 21 '20 15:02 guaraqe

@guaraqe i love to see efforts going the way of merging jupyterWith with nixpkgs.

has progress been made on this? is any help needed?

leonardp avatar Apr 03 '20 11:04 leonardp

Will #99 impact the addition of jupyterWith to the jupyter modules for NixOS? Or would this still happen, just with more stable dependencies in the form of a flake?

evanjs avatar Jul 30 '20 16:07 evanjs

The idea of a flake is for it to be separated from Nixpkgs, so the ecosystem can be more decentralized. I still have to try to do it, to see if is a good match for JupyterWith. If it works well, there will be no merge, if it doesn't, I will try merging once more.

guaraqe avatar Jul 31 '20 08:07 guaraqe

Hrm, alright. Dependencies aside, I'm hoping there's a way to get a module for either jupyter lab or jupyterWith at some point. Much easier to manage long-running services that way, in my experience.

evanjs avatar Jul 31 '20 21:07 evanjs

Flakes allow to expose NixOS modules, so this should be possible. A reference: https://www.tweag.io/blog/2020-07-31-nixos-flakes/

guaraqe avatar Aug 01 '20 07:08 guaraqe

I'm building a jupyterhub service for nixos and here are all the kernels I was able to get running without adding new packages https://github.com/NixOS/nixpkgs/pull/94783#issuecomment-670018572. I would love to help getting some of the kernels ported over. Specifically the ones that are not available at the moment are not checked. I will keep this up to date.

  • [X] :: python
  • [X] rust
  • [X] ansible
  • [X] bash
  • [X] irkernel
  • [X] ihaskell
  • [x] c :: https://github.com/NixOS/nixpkgs/pull/94783
  • [ ] gophernotes :: https://github.com/NixOS/nixpkgs/pull/94902
  • [x] inix(nix-kernel) :: https://github.com/NixOS/nixpkgs/pull/94948
  • [ ] ijavascript :: https://github.com/NixOS/nixpkgs/pull/94945
  • [x] iruby :: https://github.com/NixOS/nixpkgs/pull/94947
  • [ ] xeus-cling
  • [ ] juniper

@tonyfast this should track which kernels are available in nix.

costrouc avatar Aug 07 '20 22:08 costrouc

Flakes allow to expose NixOS modules, so this should be possible. A reference: https://www.tweag.io/blog/2020-07-31-nixos-flakes/

Thanks! Been trying to wrap my head around flakes; I really need to actually read the blog posts and start playing with them.

@costrouc Thank you! I'm excited to see this added as well!

evanjs avatar Aug 10 '20 14:08 evanjs

@costrouc I'm also massively excited for this, thank you!

devhell avatar Nov 14 '20 15:11 devhell

Hey all.

In the last few days I tried to package a few jupyter packages in nixpkgs, and I managed to package, with working tests as of the moment:

  • xeus
  • xeus-python

I also had to package a few other dependencies of them as well. All work was done completely in nixpkgs at:

https://github.com/NixOS/nixpkgs/compare/master...doronbehar%3Apkg%2Fxeus

I started working on packaging those in nixpkgs with the aim to add support for xeus-python kernel here, but I eventually decided not to use Jupyter at all for the task I have at hand. That's why I haven't opened a PR but anyone else is free to take the lead from here.

I also added the jupyterlab-lsp package to nixpkgs, (see this), which might interest some of you.

doronbehar avatar Mar 03 '22 15:03 doronbehar

We are converting current master into a flake and reworking the API. You can follow the progress in main branch. In the roadmap we have we also plan to expose NixOS module for jupyterhub.

garbas avatar Aug 17 '22 20:08 garbas