While, in general, the various outputs of a flake could be completely independent, in practice ones such as checks, packages and devShells will have much in common.
Can you recommend some scheme for sharing code between these?
As a concrete example, there is probably going to be a huge overlap between the buildInputs[1] in all of the above. What is a good way of sharing these? There are bound to be more things that aren’t so immediately obvious to me.
[1] or nativeBuildInputs: every time I try to brush up on the difference between this and buildInputs, after much reading I go away with the feeling that I still don’t get it.
you can reference flake’s output via “self.XXX” as described in the previous post, or some flakes declare everything in an overlay and then inherit the flake attribute from the overlay like