When initially building something with nix via some command…
E.g. say nix develop or nix flake check
…nix helpfully prints which derivations it’s evaluated to and about to build.
$ nix flake check
building '/nix/store/9flh3qfkggjjj5r5xs3yn3qwplbaynsj-python3.9-pytorch-1.11.0-rc2.drv'...
building '/nix/store/mvzmpm7y017v5ycb5mrm3rrkihywwgj8-aws-sdk-cpp-1.9.150.drv'...
However, once you’ve run it once this information is no longer shown the second time around.
Is there an easy flag to get nix commands like nix develop, nix flake check etc to spit out which derivations they’ve evaluated to after they’ve already been built?
(My main motivation is to figure out why e.g. nix develop builds different things to nix flake check)
To answer my own question, it looks like nix --debug develop prints the top-level derivation (e.g. /nix/store/ylgp67gq5mjpjrfkxsnqrp3yxvaan1sy-nix-shell-env.drv)
However the output is quite noisy, if anyone has simpler flag I’d appreciate hearing it
nix eval doesn’t build. So the latter is kind of expected, on top comes the fact that “devShells” usually aren’t buildable at all.
Also iirc nix eval nixpkgs#hello will tell you the output path of hello, while nix eval nixpkgs#hello.drvPath will tell you the path of the derivation.