`patchelf` is the keyword that makes them fit into the nix store system.
Or you could just use nixpkgs. Is there any particular reason you don't like it?
but to he fair, the Windows story would really need to improve for this to be realistic---one would need to be able to build Windows native packages, not just WSL. even the OpenGL story is unsatisfactory when developing graphical apps to be distributed as binaries on Linux. these are sadly not easy to fix and it would require a company to really believe in the vision and drive these investments.
My impression cross compiling C/C++ works fairly well.
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