I'm certainly still learning and not an expert. For my own python projects, I've converted them to poetry and made a flake that I can easily tweak for development environments. For adding something like paul-gauthier/aider, there is fairly decent documentation on how to make a python nix package with examples here. It will probably be a bit slow your first time because you will have to follow along the documentation, but the second and third time you do this, it will be fairly quick.
EDIT: specifically, you want to look at buildPythonPackage