Thanks, and there’s a lot to unpack. What follows are mostly just notes so that it will make sense to me later.
Looking at the source of mkShell
that you linked, it will call mkDerivation
in the end.
As you stated that nix-shell
treats both buildInputs
and nativeBuildInputs
the same (does this apply to other *Inputs
as well?), I went ahead and poked around in NixOS/nix to find the source of nix-shell
. Am I on the right track looking at nix-build.cc
? My C knowledge is next to nothing, but the line below tells me that I’m probably am.
// nix-build.cc, line 89
auto myName = runEnv ? "nix-shell" : "nix-build";
Couldn’t figure out yet how and where *Inputs
end up though.