`lib.getExe` and `lib.getExe'` are not safe

Almost… what I’m actually after is a way to pick any executable out of a drv’s /bin/, but have it checked at build time that this executable actually exists so as to prevent typos.

Did pbsds’s suggestion satisfy it? If not (and since it sounds like there’s some confusion), maybe a real example of where you want to plug something like this in would help?