How to handle Python requirements from Github?

Given a requirements.txt like this

pynvim==0.4.2
PyYAML==5.3.1
git+https://github.com/ms-jpq/std2.git@b6e6a9e2d36c719b0099fd8d4b5d669bc8b43816
git+https://github.com/ms-jpq/pynvim_pp.git@b4892c629b2f7e18a0b236f07a47ba8692299349

how would I write a Nix derivation for this thing? I can’t use nix-shell, it has to just run like any other CLI tool.

I know that I can just throw pynvim into the buildInputs or propagatedDependencies or anything like that. But what can I do about the custom dependencies which are not already packaged in Nix? Let’s assume they have their own requirements.txt files :frowning:

All of the python2nix variations I found are abandoned/archived

I would try GitHub - DavHau/mach-nix: Create highly reproducible python environments , as @DavHau is pretty active and does a pretty good job in solving problems relating to this (although not sure about this exact use case).

2 Likes

Thank you very much, this actually worked without any hiccups! Amazing project :medal_sports: