Does globalSettings apply to all the packages in basePackages?
No, just the ones specified in packages attrset.
It is badly named. Certainly not 'global'.
Can be fixed along with this: https://github.com/srid/haskell-flake/issues/261
Srid said:
No, just the ones specified in
packagesattrset.
Wait. Hmm. Let's confirm that first. Because line 83 here suggests it only applies if you have settings.<foo>.
Jesus, that code (I've written) is not super clear to read. :face_palm:
Srid said:
Srid said:
No, just the ones specified in
packagesattrset.Wait. Hmm. Let's confirm that first. Because line 83 here suggests it only applies if you have
settings.<foo>.
This is probably the case
shouldn’t it mapAttrs on config.packages and use config.settings.${name} to get the mod for a given package
There can be a case where you have a package in settings attrset, but not in packages.
Also, when we introduce different settings default here, we might need a way to test if the setting is actually applied.
Right. We want to add a dedicated test/??? for this, to check all cases.
Incidentally, as of yesterday, haskell-flake master uses Nix (flake checks) for tests. No more bash scripts. https://twitter.com/sridca/status/1763528379188265314
example/flake.nix, test/*/flake.nix are all candidates for defining these tests.
Srid said:
There can be a case where you have a package in
settingsattrset, but not inpackages.
Right, so merging the attribute names looks like what we need
Possibly. In any case, having clear tests cases should also be self-documenting in a way.
And allow us to freely refactor things without fear of breaking semantics (because the tests, which encode these semantics, will catch them).
FYI: https://github.com/srid/haskell-flake/commit/307961a20136dd75b761fa0e47b947a6fed757a8
haskellProjectTests is pretty nascent right now, but we can improve it to accommodate our future tests.
Last updated: Dec 07 2025 at 16:49 UTC