Using pythonPackages in Postgresql

How do one make pythonPackages available to the python interpreter in postgresql when building postgresql with python support?

Specifically I want the webauthn package available to my postgres instance.
I’ve tried building my own python env, and overriding my postgresql package like so:

pg-python = pkgs.python312.withPackages (ps: [ ps.webauthn ]);
pg = pkgs.postgresql_17.override { pythonSupport = true; python3 = pg-python;};

But in my plpython3u code I get error “ModuleNotFoundError: No module named ‘webauthn’” so unfortunately that doesn’t work.

Any help is appreciated.

A nix flake update actually solved my error!