Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Prefer composable approach" #11

Closed
utdemir opened this issue Apr 27, 2020 · 1 comment
Closed

"Prefer composable approach" #11

utdemir opened this issue Apr 27, 2020 · 1 comment

Comments

@utdemir
Copy link
Owner

utdemir commented Apr 27, 2020

There is an issue in haskell-nix repo suggesting a few good practices, and they all make sense to me. I think we should apply them to our template too.

To quote:

The examples use methods that cause issues when trying to extend the package set further. Using the right tools, which are no harder, we can avoid frustration down the line.

  • Use overlays instead of overrides. They are the way to go, because they are more powerful and, I'd argue, more consistent: overlays for packages sets, overrides for packages.
  • Avoid rec keyword. People get used to it and will use it in overlay definitions, leading to surprises.
  • Use haskellPackages.extend instead of .override { overrides =. It lets you add more layers of overrides which is more flexible. Attempting the same on the current code replaces the single layer of overrides with the new one, which is unexpected. As a bonus, it is syntactically simpler.

I think the first and third point is relevant to us.

@utdemir
Copy link
Owner Author

utdemir commented May 11, 2020

Looks like there're still some issues around using overlays for Haskell packages (NixOS/nixpkgs#26561), so I'll postpone this for a while.

@utdemir utdemir closed this as completed May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant