Install header files with home-manager

I have recently found out about home-manager, and I managed to port most of my setup over with my Ubuntu workstation. Almost everything works, and I am about to adapt the settings, so I can replicate it over to my Mac. I sometimes install new CPython through pyenv for work, so I am curious to find out if I can setup home-manager to install all the libraries and headers (and somehow expose them) so I can compile the interpreter, so I don’t have to rely on the host OS package repository (regardless if it is a thing)?

seems to be fixed, I just added this line to my home.nix

home.extraOutputsToInstall = [ "dev" "lib" ];

and then when I run pyenv install I added some paths

#!/usr/bin/env sh

export CPPFLAGS="-I$HOME/.nix-profile/include $CPPFLAGS"
export CFLAGS="-I$HOME/.nix-profile/include $CFLAGS"
export LDFLAGS="-L$HOME/.nix-profile/lib $LDFLAGS"
export PKG_CONFIG_PATH=$HOME/.nix-profile/lib/pkgconfig:$HOME/.nix-profile/share/pkgconfig:$PKG_CONFIG_PATH
export C_INCLUDE_PATH=$HOME/.nix-profile/include:$C_INCLUDE_PATH
export INCLUDE_PATH=$HOME/.nix-profile/include:$INCLUDE_PATH
export LIBRARY_PATH=$HOME/.nix-profile/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$HOME/.nix-profile/lib:$LD_LIBRARY_PATH

$HOME/.nix-profile/bin/pyenv install -vf 3.12.6

I suppose I am doing it the right way?