Closed simonrainerson closed 2 years ago
A little strange that we give certain targets a special meaning. I.e. this logic would not be true if I created a component with mkComponent
and then just happened to name a target docs
that was a derivation, I would not be able to get a shell for it.
But I also see that we have already committed to aforementioned special-casing in component.nix
so ignore what I said...
But I also see that we have already committed to aforementioned special-casing in
component.nix
so ignore what I said...
Yeah. We could do something like tagging everything created with the base.documentation
functions (and add a base.documentation.includeInCombinedDocs
function to tag custom derivations), and then do all the special stuff with everything in the component that has the tag. Then it wouldn't matter where in the component they were so it would be a bit flatter.
But that would be a bit bigger effort (and major version update) so maybe this can work in the meanwhile.
Couldn't the shells for sub-derivations be handled with passthru
?
Nevermind, this kinda does that, although we could do it more general.
Docs are derivations in derivations, not derivations in components so they are missed by collectComponentsRecursive nad did not get any shells. Now we add on shells for them specifically and add a warning that the
docs
shell itself it not valid since it's just the symlinkJoin without anything useful.Fixes #281