goodbyekansas / nedryland

Nedryland is a collection of utilities and a build system for declaring, building and deploying microservice solutions.
https://goodbyekansas.github.io/nedryland/
BSD 3-Clause "New" or "Revised" License
9 stars 0 forks source link

🐛 Fix shells for docs #288

Closed simonrainerson closed 2 years ago

simonrainerson commented 2 years ago

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

abbec commented 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.

abbec commented 2 years ago

But I also see that we have already committed to aforementioned special-casing in component.nix so ignore what I said...

simonrainerson commented 2 years ago

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.

abbec commented 2 years ago

Couldn't the shells for sub-derivations be handled with passthru?

abbec commented 2 years ago

Nevermind, this kinda does that, although we could do it more general.