Skip to content

remove --hpack support #628

Open
Open
@sellout

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions