I am writing a program in Haskell on my Mac (a command line executable, not an application). I use GitHub to host the git repository and the main page. I made the <project>.cabal and Setup.hs , since Cabal makes it easy to build, test, and create documentation. I can also upload to Hackage, I donβt know.
When I mark version 1.0, I want to make a Homebrew formula to load the tarball from GitHub and build it. I want the only dependency is GHC .
I will use runhaskell Setup configure / build / install (with a prefix like / usr / local / Cellar / ...) instead of the cabal command to avoid dependency on cabal installation.
All this is fine until I start using packages from Hackage, for example. flame builder and eson. How can I do it?
I do not want to force non-Haskellers to download the entire Haskell platform. Ideally, people should be able to just let Homebrew install GHC before it builds my program, and then if they want to, uninstall GHC afterwards. If I make the Haskell platform dependent and first install my Haskell dependencies using cabal-install or similar,
- The
~/.cabal/ folder with packages will be left behind, even if later they are brew uninstall haskell-platform - I could only go through Hackage and make people
cabal install it, i.e. limit the area for the most part to Haskellers.
I see Cabal (-install) + Hackage as a useful development tool and for Haskellers, but not suitable for this.
Should I just download the source code of the packages I'm using and include it in the source tree by adding it to the build command? Or should I use the --package-db option (found here )? Or can my formula load tarball for a package on the fly and build it too?
I looked a bit at cabal2arch ( Arch wiki , GitHub repo ), but I'm not sure how it handles the dependencies, or if it just does what I don't want to do.
source share