Nix generally assumes run-time dependencies is a subset of the build-time dependencies.
This means many Nix builder functions try to automatically scan the output for runtime dependencies and "rewrite" them for runtime usage.
However shell scripts which are often exported by packages do not get this automatic scanning treatment.
This means you have to use the makeWrapper
package and use either the makeWrapper
or wrapProgram
utility functions.