I have some code that depends on a custom patched GHC. Currently my options to allow other people to build this code are:
- Create a GHC bindist. Make it available somewhere online. Add this kind of configuration into stack.yaml:
setup-info:
ghc:
linux64-custom-bugfix-tinfo6:
8.6.3:
url: "http://myserver/downloads/ghc-8.6.3-x86_64-bugfix-linux.tar.xz"
compiler: ghc-8.6.3
ghc-variant: bugfix
allow-newer: true
- Give instructions to user on how to build the custom GHC and tell them to use the following Stack configuration updated for their system:
extra-path:
- /home/login/repo/ghc/_build/stage1/bin
system-ghc: true
compiler: ghc-8.7.20190131
allow-newer: true
Both options are not satisfying.
What I would like instead is to be able to specify in stack configuration:
compiler:
git: https://github.com/me/ghc.git
commit: 4b00a96cee23ba0bf658834709703368b02f7e30
flavour: devel2
This would:
- download GHC from git (similarly to an extra-dep).
- build it using: ./hadrian/build.stack.sh -c -j --flavour=devel2 binary-dist
- install the resulting bindist into: STACK_ROOT/programs/ARCH/ghc-4b00a96cee23ba0bf658834709703368b02f7e30-devel2/
- use this GHC as a compiler
I have some code that depends on a custom patched GHC. Currently my options to allow other people to build this code are:
Both options are not satisfying.
What I would like instead is to be able to specify in stack configuration:
This would: