haskell-template icon indicating copy to clipboard operation
haskell-template copied to clipboard

Slim down flake inputs using flake-parts partitions

Open srid opened this issue 4 months ago • 1 comments

https://flake.parts/options/flake-parts-partitions.html

srid avatar Oct 17 '25 14:10 srid

@roberth

In case if this interests you (as an user report):

I tried using flake-parts partitions to prune out dev-related inputs from top-level flake.nix so that nix run doesn't have to pull in and evaluate the unnecessary stuff. For that purpose alone, partitions work well.

But then, I tried adding Emanote docs (example) which adds a packages.site (static site). I can't actually expose this package to top-level flake (dev partition exports only devShells and checks); nor is there a way to actually access it for the CLI. This sounds like a design trade-off per https://github.com/hercules-ci/flake-parts/issues/258

So, I will close this PR, and go back to the subflake approach (where things are fully decoupled and hooked up via --override-input) viz.: https://github.com/srid/haskell-flake/blob/3ab2a076aba01d932644f6f21e8aa507d28bb36b/.envrc#L2

srid avatar Oct 17 '25 16:10 srid