The core we've always fought with is that most *nix tools (both package managers and build tools) cares about "building for home on my machine" (nix does seem to have some separation at least) whilst many developers target crossplatform or multi-targets.
C/C++ has many Windows (where Release / Debug are different build profiles for better or worse), Embedded and Console developers. All of the latter require not only platform support (Nix on Windows is recommended via WSL) and more or less support for programs/libraries to multi-target.
An local developer here in Stockholm did a deep dive with package managers a few years back and it was a depressing watch since only VcPkg seemed to particularly care about the multi-targeting (No idea if Nix handles this well? but it was eliminated due to not even supporting Windows) and a package manager looking to be even unofficial will have a hard time "winning" without filling both parts.
And I do recognize that while vc-pkg was best on paper in many ways, the GNU community would never adopt it.... and here we are still years later.
Personally at this point I think we should maybe just put a thin shim to make compilers/tools recognize git submodules officially and let those become packages because people won't agree on anything anyhow.
(Package managers video) https://www.youtube.com/watch?v=C1m-Uy4nuQA