I’m trying to package a single Python script. I feel like it shouldn’t take longer to write the package than it took to write the Python script. The thing is, the script has two dependencies: (1) libgen-api, which is not in nixpkgs, (2) tabulate, which is in nixpkgs. So I’m banging my head against a wall trying to get this to work, but solving one problem only creates another.
I know I have to do pkgs.python3.withPackages
somewhere. And I know I have to do a fetchFromGitHub
somewhere to get the libgen-api
from GitHub. But it’s totally opaque to me what needs to be a function, and what needs to be an attribute set, and what a self-calling function is, or when and why I need to provide default values, or when I use paretheses or curly braces.
I just need an example so that I can plug in the values for my package. Or better yet, some kind of tool that automatically takes a pipenv file and produces a nix file from it.