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

remove --hpack support #628

Open
sellout opened this issue Sep 4, 2024 · 0 comments
Open

remove --hpack support #628

sellout opened this issue Sep 4, 2024 · 0 comments

Comments

@sellout
Copy link

sellout commented Sep 4, 2024

I agree with the comments on #3751 – cabal2nix shouldn’t keep growing as new ways to produce a Cabal file appear. It makes sense that the Cabal file is central, and some tools can produce Cabal files while others consume them. So I’m proposing the opposite.

There are two paths here, I think:

  1. remove all “feature creep” (fetching from git, etc.), such that hpack - | cabal2nix (or hpack && cabal2nix) is sufficient for “hpack support”; or
  2. keep those other pieces, and provide a generic preprocessor hook to run an arbitrary process, like cabal2nix --pre hpack or cabal2nix --pre dhall-hpack-cabal.

While the first option is ultimately simpler, I think it involves larger changes in downstream projects, so the second option seems much more practical.

Footnotes

  1. https://github.com/NixOS/cabal2nix/pull/375#pullrequestreview-153642460 and https://github.com/NixOS/cabal2nix/pull/375#issuecomment-431089214

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