17 Jul 2023 |
| Jez (he/him) ♾️ joined the room. | 14:29:47 |
Jez (he/him) ♾️ | ok, it's been a while since i looked at this, but i'm having a go at implementing a nix-flakes buildpack for repo2docker which will allow use of a git repo with a flake.nix on https://mybinder.org/ | 14:32:09 |
Jez (he/him) ♾️ | story so far is that i got it working 2 years ago using the existing nix buildpack and edolstra's flake-compat, and to prove the long-term reproducibility of nix, it still builds and runs using repo2docker ! https://codeberg.org/jezcope/binder-nix-flakes | 14:34:22 |
Jez (he/him) ♾️ | hmm, OK, first roadblock to doing anything with a reasonably recent nixpkgs is this: repo2docker does not work with jupyter-server v2 https://github.com/jupyter-server/jupyter_server/issues/1038 | 16:24:45 |
Jez (he/him) ♾️ | is there a standard way to install an old version of a python package? equivalent to pip install jupyter-server<2.0.0 | 16:25:54 |
Jez (he/him) ♾️ | I guess I should ask in #python:nixos.org | 16:28:22 |
18 Jul 2023 |
| Jonas Chevalier changed their display name from zimbatm to Jonas Chevalier. | 11:06:32 |
20 Jul 2023 |
Bruno Rodrigues | hi again, I wrote two blog posts on Nix and R, maybe you’ll find them interesting :) any feedback welcome! | 14:40:00 |
Bruno Rodrigues | https://www.brodrigues.co/blog/2023-07-13-nix_for_r_part1/ | 14:40:02 |
Bruno Rodrigues | https://www.brodrigues.co/blog/2023-07-19-nix_for_r_part2/ | 14:40:10 |
raitobezarius | In reply to @petrichor:envs.net is there a standard way to install an old version of a python package? equivalent to pip install jupyter-server<2.0.0 checking out an older nixpkgs | 16:12:18 |
raitobezarius | or not using nixpkgs | 16:12:26 |
Bruno Rodrigues | fellow Nixers, I'm a beginner and started a series of blog posts that might interest some of you. It focuses on R but I believe a lot of what I describe could be used for any language | 16:19:15 |
Bruno Rodrigues | https://www.brodrigues.co/blog/2023-07-13-nix_for_r_part1/ | 16:19:18 |
Bruno Rodrigues | https://www.brodrigues.co/blog/2023-07-19-nix_for_r_part2/ | 16:19:34 |
Bruno Rodrigues | Feedback more than welcome | 16:19:49 |
21 Jul 2023 |
Jez (he/him) ♾️ | In reply to @raitobezarius:matrix.org or not using nixpkgs yeah, I'm leaning towards trying to poetry2nix it now. that will probably rebuild the python packages but at least it won't try to rebuild a weirdly specific version of llvm, which is what happened when I picked a nixpkgs commit with the right version of jupyter-server... | 06:01:24 |
Jez (he/him) ♾️ | turned out not many packages from that commit were cached 😭 | 06:01:57 |
| Domen Kožar changed their profile picture. | 12:30:46 |
25 Jul 2023 |
Carl Thomé | Any easy way of setting up an ad-hoc Python environment with a few packages on the command line with nix run
I'm able to get nix run nixpkgs#jupyter working but can't get NumPy into a kernel without writing a shell.nix or similar first. Was thinking nix run 'nixpkgs#python3.withPackages(ps: with ps; [torch])' could work but it doesn't seem to.
| 00:19:12 |
Carl Thomé | Or like if it was possible to nest Python packages with nix shell but they don't end up in the same site-packages. | 00:21:14 |
Carl Thomé | Guess this is one area where nix-shell is still better?
nix-shell -p 'python310.withPackages (p: [ p.numpy ])' does what I expect.
| 00:25:18 |
| pbsds changed their display name from pbsds to pbsds (UTC+1). | 19:03:50 |
26 Jul 2023 |
Jez (he/him) ♾️ | don't know if this is idiomatically correct, but nix develop --impure --expr "(import <nixpkgs> {}).python310.withPackages (p: [p.numpy])" env seems to work as intended | 07:37:30 |
Jez (he/him) ♾️ | --impure is required because of the reference to <nixpkgs> which i think will be the channel rather than the flake registry entry | 07:38:31 |
Jez (he/him) ♾️ | nix shell works without specifying env on the end | 07:42:58 |
Jez (he/him) ♾️ | and you can use the flake registry entry like this, but it's more verbose:
nix shell --impure --expr '(builtins.getFlake "nixpkgs").legacyPackages.x86_64-linux.python3.withPackages (p: [p.numpy p.seaborn])'
| 07:44:39 |
Jez (he/him) ♾️ | maybe this is slightly better?
nix shell --impure --expr '(import (builtins.getFlake "nixpkgs") {}).python3.withPackages (p: [p.numpy])'
| 07:47:04 |
Jez (he/him) ♾️ | * and you can use the flake registry entry like this, but it's more verbose:
nix shell --impure --expr '(builtins.getFlake "nixpkgs").legacyPackages.x86_64-linux.python3.withPackages (p: [p.numpy])'
| 07:47:16 |
Jez (he/him) ♾️ | * maybe this is slightly better because you don't have to remember what system you're using?
nix shell --impure --expr '(import (builtins.getFlake "nixpkgs") {}).python3.withPackages (p: [p.numpy])'
| 07:47:39 |