Example nix files in the user guide contain syntax errors
The example nix files in the user guide which show how to use haskell.nix with stack/cabal projects contain syntax errors.
In particular, the commented modules block doesn't work, because it contains attribute set elements in a list:
{
modules = [
# Specific package overrides would go here for example:
packages.cbors.package.ghcOptions = "-Werror";
packages.cbors.patches = [ ./one.patch ];
packages.cbors.flags.optimize-gmp = false;
# It may be better to set flags in `cabal.project` instead
# (`plan-to-nix` will include them as defaults).
];
}
As a piggy-back issue: It's pretty unclear to me what the modules list can be used for, especially because the disclaimer states a better way to set such flags.
@kaldonir ohh. That's missing the curly braces :( It should be modules = [{ ... }].
In general you can juse all kinds of options you'd like to change. The disclaimber is must supposed to be a suggestion. Ideally you only have one single source of truth, and if you use a cabal project (or stack project), the cabal.project or stack.yaml file should be authoritive and haskell.nix should just do as the respective authoritive files say. If however you want to deviate from that (or not want to use callStack/CabalProject functions) for your ci, you can do all the customizations in modules.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hopefully this sort of thing will be fixed by #1714
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.