CUDA working with poetry2nix

I tried both cuda12 and when that failed, cuda12-local. I tried to pretty much copy your example modified only where needed but I’m sure I missed something. I’ve already deleted my original attempts and not going to try again right now. I’ll get back to this at some point, and again, I’m pretty confident I just dropped something from your example.

For uv2nix yes but (as far as I can tell) the base pyproject-nix does not have its own builder, instead it parses the pyporject.toml and nixifies the package names, then returns a function containing the lists of packages to get from a python package set that get passed to a python3.withPackages.

For example my flake looks like this:

project = pyproject-nix.lib.project.loadPyproject { projectRoot = ./.; };
python = pkgs.python3;

pyEnv = python.withPackages (project.renderers.withPackages {
  inherit python;
  groups = [ "dev" ];
});

And I can override my nixpkgs’ python to pass it new buildPythonPackage recipes to use. For example, I have a couple packages on PyPI I use that aren’t prebuilt by nix and the flake fails unless I write the derivation.

The uv2nix adds in a uv.lock parser that then writes its own derivatives. So I don’t have the exact packages described by uv in my environment but I’m more concerned about getting an environment set up on both my computer and a server so as long as uv add works, that’s good enough for now.