After some quick discussion in Vimjoyer's Discord server:
Nix evaluates config.scripts.output
because I pointed nix-build
to it
with the -A
flag.
To evaluate config.scripts.output
, Nix must know the value of
config.requestParams
.
Evaluating config.requestParams
requires knowing the value of
${config.scripts.geocode}
${config.script.geocode}
is a string
interpolation. Evaluating
the value of config.script.geocode
eventually
boils down to the return value of mkDerivation
. Per
this, mkDerivation
outputs a special attribute set that can be used in string interpolation,
and in that case evaluates to the Nix store path of its build result.
So this is why config.script.geocode
gets built.