nix2cabal is the opposite of cabal2nix. It lets you define a Haskell package in Nix and generate a Cabal file using that definition. This eliminates the need to keep a Cabal file in Git, but still lets you access a Cabal file when you happen to need one.
Shout-out to hpack, without which this would not have been so simple.
Nix definition | Generated Cabal file |
---|---|
nix2cabal/default.nix | nix2cabal-test.cabal |
brackets/default.nix | brackets.cabal |
foomail/default.nix | foomail.cabal |