I’ve been playing around with both Mach-nix and poetry2nix the past two days. I’m super impressed by both projects, and think that they have complementary strengths. It’s awesome to see the effort and creativity by the authors to improving Nix’s python dev story!
If I may present a lay analysis (please correct me where I’m wrong!)
Mach-nix does a great job of choosing overrides based on nixpkgs, and deduplicating work of transferring all the knowledge already embedded in nixpkgs to a new build system. As I understand things, it can even choose between multiple overrides based on the specific version.
poetry2nix uses an industry hardened resolver, and makes it easy to collaborate with non-nix users. It does a great job of building wheels, too.
Nixpkgs has many fewer supported python packages, as each is manually added, and only one version of each in general, but the packages that are there have the highest working rate. e.g. nixpkgs PyTorch works (I know there’s an issue tracking this for both Mach-nix & poetry2nix).
I would love to see efforts coalesce between these three approaches! Imagine the coverage and ease of use that could be achieved. I honestly believe it could rival and surpass Anaconda if everyone works together.
I am a bit concerned about our already-small nix/python community fragmenting across these three projects, based on what works where.
IMHO, the ultimate approach might:
- have no requirement to manually write derivations
- support poetry.lock for collaborating with non-nix users
- support per-package override versioning
- leverage existing work in nixpkgs where possible rather than recreating
- ultimately be mainlined into NixOS/nixpkgs
Thoughts??