How can I write a Python package derivation in a flake?

Which module contains buildPythonPackage? It’s telling me it’s not in stdenv.