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

IIUC:

  1. The old nix-shell served a dual purpose and the new Nix caters for these via two separate mechanisms: nix shell and nix develop.

  2. In the old Nix, shellHook was executed by nix-shell.

What are the interactions between shellHook and nix shell/nix develop?

In my flake, nix develop shows signs of having executed source ${pkgs.geant4}/nix-support/setup-hook but I have no idea how or why; various experiments seem to suggest that it has nothing to do with shellHook.

The effects of source ${pkgs.geant4}/nix-support/setup-hook are absent from (but needed in) nix shell: how should I go about providing them?