Nix shell vs. nix-shell and setup hooks

Hi there! I am trying to run coq with packages. Coq finds its packages if they are listed in COQPATH,
and

nix-shell -p coqPackages.mathcomp-ssreflect

sets this variable correctly. This is probably due to a setup hook added with addEnvHooks by the coq package.

In contrast, with nix shell or nix develop I don’t manage to get the COQPATH set automatically, whether I specify the packages on the commandline or in a flake. Is there a way to achieve this?

3 Likes