Is it possible to install a version of a package from github using Haskell stack?
e.g. in a .cabal
or a stack.yaml
file, how can I point a depe
In my case i wanted to depend on a fork of pandoc, specifying a precise commit. It worked by adding the following to stack.yml
:
extra-deps:
- archive: https://github.com/italia/pandoc/archive/1327c564cccf5dfa387a2956443990d9854c85cd.zip
This would work with any branch-like URL on Git. I found my url by browsing the files at the commit and copying the URL from the "Download ZIP" button.
Note that my branch has a specific version, higher than any version Stack could fetch from the resolver. I pinpoint the version in the Cabal dependencies. If the version on that branch would overlap with one available in the resolver's index, i'm not sure about which one would be picked