That was solved decades ago with static linking. The bane of distro management is keeping everything as up to date as possible without breaking things.
For proprietary software, you have to consider the binary as-distributed "source" and build a version with proper dynamic linker an library path. Some third party binary wouldn't run as-is on NixOS, but there is a package that sets correct linking settings post-factum.
If dependencies never change in place, you're emulating static linking with a dynamic linker.