1

How do I generate the appropriate package file?

The hackage upload page has a link to: https://www.haskell.org/cabal/users-guide/installing-packages.html#setup-sdist but after reading that I'm still unsure.

I've tried:

cabal setup sdist
cabal: unrecognised command: setup (try --help)

As well as:

setup sdist
zsh: command not found: setup
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
  • Do you mean, the `yourproject.cabal` file (you must have that in order for cabal to do anything at all with your project!) or the `yourpackage-0.1.0.0.tar.gz` tarball that can be uploaded to Hackage? – leftaroundabout Aug 20 '17 at 18:32
  • The `yourpackage-0.1.0.0.tar.gz` tarball. – Chris Stryczynski Aug 20 '17 at 18:43
  • 2
    Sounds like you are looking for `cabal sdist`? Seems as if `setup` in the documentation is overloaded and refers to either `cabal` or `runhaskell ./Setup.hs` https://www.haskell.org/cabal/users-guide/installing-packages.html#building-and-installing-packages – ppb Aug 20 '17 at 18:43
  • Here is a useful guide: https://functor.tokyo/blog/2018-07-16-release-haskell-packages-to-hackage – Chris Stryczynski Jul 16 '18 at 15:14

1 Answers1

2

To generate the package:

  • With cabal: cabal sdist

  • With stack: stack sdist

Thanks to @ppb

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286