-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Support for stable NixOS & older Python releases? #1707
Comments
Having a keen interested in software archeology, I'm all in favor. |
For dropped Python interpreters there is https://github.com/cachix/nixpkgs-python/.
I'm rewriting poetry2nix, currently out of tree, on top of a pyproject.nix. I think a function for selecting a Python interpreter based on
I 100% agree. I've wanted to split this into a separate repo for quite some time. However, I also see a huge opportunity here to improve on what we currently have. |
My brute-force bot (see #1742) tries it 'the other way': That does get you surprisingly far (plus minus the packages that need a 'sweep' of all version to determine cross-over points when their build-systems changed, working on it). I suppose the next step (after I've finally landed that PR with all the overrides) is to turn it into a standalone tool that you can throw at a poetry-project and it will suggest the necessary overrides. Crawling pypi isn't a bad idea, but there's some scaling issues to be aware of. |
To be clear: This is not what I have in mind at all. I don't think it's a good approach. |
A note upfront: this is me with my work-hat on. I'm not reaching out to ask you to do all the work,
but to see if
I'd be considering to step up as co-maintainer.
Context: at work I'm operating numerous applications, some of them written in Python. The challenges here are
sometimes we cannot upgrade (yet). There's quite a bunch of Python 3.8 stuff and I think we even have older Python
(I'm only talking about Python 3+ here, I don't even know if poetry is usable with Python 2.7).
Right now we have NixOS and VirtualEnvs on top. This is a well-known source for pain, mostly due to prebuilt
wheels assuming a traditional FHS structure. But also source dists are non-trivial because building them on-the-fly
causes store references in the virtualenv where you need to create explicit gcroots to avoid them being
garbage-collected.
My hope is that we can build some of these applications with poetry/poetry2nix to have a Nix-native build
circumventing all of these issues (short of benefits such as automatic rebuilds if e.g. the glibc/openssl/...
from the nixpkgs used gets a security update).
The biggest challenge I faced while playing around with poetry2nix is that it's directly following
nixos-unstable:
For good reasons, nixpkgs upstream drops packages that were EOLed, such as Python 3.8. However, this is
not always an option. I'm wondering if it would make sense for poetry2nix to pick up the
Python interpreter specified in pyproject.toml and perhaps even provide a few Python packages
that were dropped upstreams, similar to what nix-phps is
doing.
Would you be willing to accept such a change?
Generally, I'm not a big fan of using unstable nixpkgs for that kind of work, there's - for me -
a too high risk of breakage between rev upgrades in contrast to a stable NixOS.
Would it make sense to maintain a "stable" branch of poetry2nix such as what home-manager or
nixos-mailserver are doing? This should probably include an up-to-date build-systems.json and
all build-system fixes being backported.
I'm considering to help out here.
Finally, I managed to mess a build up pretty quickly because of locked dependencies that break build-systems
because they depend on the same package, but on a different version. See
#1616 for further context. The fix I proposed there seems to work so far, but would be helpful to get more feedback there.
The text was updated successfully, but these errors were encountered: