Since this issue was just linked to from another thread, and since I pondered on a similar question recently, here’s an sitrep for future readers:
- CMake strips all Runpaths before installation (unless you specifically modify the install rpath), by design
- Nixpkgs has hooks to append runpaths from
buildInputsbased onDT_NEEDED
Both are expected, just have your dependencies in buildInputs