Enable separate data output more aggressively
cabal2nix (and hence nixpkgs) does it whenever there are data files.
Ours is turned off by default, which in practice means it's basically not used.
Maybe a nix-tools bug, actually.
We have a 2.5GB docker image currently (because a couple of packages with data files bring in the entire GHC stack into our docker image.)
Note that you can enable the option yourself if you know the offending packages. Obviously we should do it automatically, but it might help you cut that down in the short term.
We ended up just setting it as a global value. It's probably the first thing I do on any haskell.nix project, just be sure.
Things we could do, not sure which is preferable:
- Default
enableSeparateDataOutputto true inhaskell.nix - Teach
nix-toolsto be cleverer about setting it when a package has data files
Is there a downside to enabling it by default (even if there's no data-files field in a package)?
No idea. I'm not sure if there's even ever a reason not to do it.