Modules for evaluation?
Currently, modules in cabalProject' and such only apply to the post-plan building AFAICT.
It seems useful to be able to define a module that will affect the arguments to cabalProject', à la the existing fake module.
The use case would be changes that affect the generation of the plan, e.g. adding dependencies that aren't on Hackage.
I am having trouble understanding what this would be for. Perhaps add an example project (does not have to work) demonstrating a use case?
Sorry for the late answer!
One use case would be exporting a haskell.nix module in one flake, that you then expect downstream users to include in their call to cabalProject' through the modules field. In our case we have a specific cabalProjectLocal that you have to use to solve issues with various packages that only support old versions of base and such.
In our case we have a specific cabalProjectLocal that you have to use to solve issues with various packages that only support old versions of base and such.
Why wouldn't you just put those things in the projects' cabal.project files? As usual, we really prefer configuring things via cabal, rather than via nix, if at all possible.
We could do that, but that would mean downstream has to manually keep it in sync with upstream, as is often the unfortunate case with Plutus.
I didn't realise the input to cabalProject' was also a module when making this issue.