So I am trying to setup the python package “requests” so that it can be used from python on NixOS. I found various “snippets” for the systemPackages variable online, but all of them just cause convoluted error messages.
Some people say you should just use a venv or a nix shell, but I really do not want to launch something like that everytime I want to run one of my scripts, especially because I launch some of them via hotkey.
Basically, I am looking for the NixOS equivalent of “apt install python3-requests”.
Already solved, I saw, but in case your scripts are not ad-hoc but (possibly) part of your system or user config, an arguably better way would be to make them into python apps (as derivations) and just include the scripts as packages. That way they’ll always bring their “batteries included” regardless of global config, and they’ll still share common dependencies (same hash in the nix store).