Help making a flake (for Geant4 (particle physics framework) examples)

Maybe this should be done with wrapProgram? But I don’t see how to automate extraction of the settings provided by ${geant4}/nix-support/setup-hook into a form that can be consumed by wrapProgram.