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

Yes.

Since nix develop is the successor of nix-shell; while not documented, it has the same behaviour regarding shellHook.

nix-shell and nix develop are used to create the build environment of a derivation. shellHook can be used to perform initialisation specific to the interactive build environment. So it is only useful for nix-shell and nix develop.

nix shell, similar to nix-shell -p, is used to create a shell environment where the specified packages are already built and ready to be used. So shellHook variable isn’t used with nix shell and nix-shell -p.

2 Likes