nix-community / pip2nix

Freeze pip-installable packages into Nix expressions [maintainer=@datakurre]
171 stars 26 forks source link

Fix typo in default.nix #66

Closed samuela closed 3 years ago

samuela commented 3 years ago

Side note: What is the reason that this is tied to 20.03? When can it be updated?

datakurre commented 3 years ago

@samuela The master should be compatible with nixos-20.09.

Unfortunately, pip2nix was build to depend pip package dependency resolvers by using its internal API. When pip2nix was first built, it probably was not obvious that it used unstable internal API. Later pip announced most of its APIs to be internal, not even trying to keep them backwards compatible, and started heavily refactoring its internals. After that, almost every feature release of pip as broken pip2nix. Because NixOS releases have usually frozen pip version for the release lifetime, it has been safe to say that pip2nix works with certain NixOS versions. But for the same reason, there have been no PyPI releases. pip installable PyPI version makes little sense, if it is almost always broken with the latest pip.

Pip2nix has served pretty well for a long time, but now I am personally uncertain about the future. I have not yet used it with NixOS 21.05 pip version. Pip rewrote its dependency resolver and update to the new dependency resolver might be unexpected amount of work. At least, I will try, how well poetry2nix works with my projects before returning to update pip2nix. (That said, I do have a lot of projects still depending on pip2nix.)

samuela commented 3 years ago

Ah I see. Thank you for this explanation! That sounds quite frustrating to have to stay up to date with the internals of pip just to keep it working. It'd be nice if pip could just put out a spec or an API...