Patch binary path for nixpkg

Hello, I’m trying to get my pull request for nixpkgs merged. This package basically only contains a perl script. In this script there are calls to several binaries https://github.com/turistu/usbip-ssh/blob/1b38f2d7854048bf6129ffe992f3c9caa630e377/usbip-ssh#L5-L8.
One reviewer noted I should patch those during the postPatch phase with substituteInPlace --replace-fail. To me this is fine, he basically wants the same thing patch-shebang does just for the mentioned binary paths.
I understand what he wants and I get the usage of substituteInPlace --replace-fail but what I don’t get is where to get the store path from. Just like patch-shebang I assume the path should be taken from the build environment, but I have no Idea how to get the path in a way that allows me to use it with substituteInPlace.
Could somebody give me a hint as to how I can get this working?

Something like ${lib.getExe whateverpackage} or if it has more than one binary then ${lib.getExe' whateverpackage "binaryname"}. See String interpolation - Nix Reference Manual.

Thank you very much! lib.getExe and lib.getExe' did the trick.