Closed ivanperez-keera closed 2 years ago
Change Manager: The main README should be updated as well to mention that GHC 9.2 is supported.
Implementor: Fix implemented, review requested.
Change Manager: Verified that:
Solution is implemented:
FROM ubuntu:trusty
RUN apt-get update
RUN apt-get install --yes software-properties-common RUN add-apt-repository ppa:hvr/ghc RUN apt-get update
RUN apt-get install --yes ghc-8.6.5 cabal-install-2.4 RUN apt-get install --yes libz-dev
ENV PATH=/opt/ghc/8.6.5/bin:/opt/cabal/2.4/bin:$PWD/.cabal-sandbox/bin:$PATH
RUN cabal update RUN cabal v1-sandbox init RUN cabal v1-install alex happy RUN apt-get install --yes git
CMD git clone $REPO && \ cd $NAME && \ git checkout $COMMIT && \ cd .. && \ cabal v1-install $NAME/$PAT/ --enable-tests && \ cabal v1-install $NAME/$PAT/ --enable-tests --run-tests -j1
Command:
```sh
$ docker run -e "REPO=https://github.com/NASA/ogma" -e "NAME=ogma" -e PAT="ogma-" -e "COMMIT=3a205e7988a15a682f5b9858c9eec089b25a9f9a" -it ogma-test
[X] The solution proposed fixes the issues described. Details: Installation completes with GHC 9.2
FROM ubuntu:focal
RUN apt-get update
RUN apt-get install --yes libz-dev
RUN apt-get install --yes git
# RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
RUN apt-get install --yes wget
RUN mkdir -p $HOME/.ghcup/bin
RUN wget https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -O $HOME/.ghcup/bin/ghcup
RUN chmod a+x $HOME/.ghcup/bin/ghcup
ENV PATH=$PATH:/root/.ghcup/bin/
ENV PATH=$PATH:/root/.cabal/bin/
RUN apt-get install --yes curl
RUN apt-get install --yes gcc make libgmp3-dev
RUN ghcup install ghc 9.2
RUN ghcup install cabal 3.2
RUN ghcup set ghc 9.2.4
RUN cabal update
SHELL ["/bin/bash", "-c"]
CMD git clone $REPO \
&& cd $NAME \
&& git checkout $COMMIT \
&& export PATH=$PATH:$PWD/.cabal-sandbox/bin/ \
&& cabal v1-sandbox init \
&& cabal v1-install alex happy \
&& cabal v1-install BNFC \
&& cabal v1-install ogma-**/ \
&& cabal v1-install ogma-**/ --enable-tests \
&& echo Success
Command (substitute variables based on new path after merge):
$ docker run -e "REPO=https://github.com/NASA/ogma" -e "NAME=ogma" -e PAT="ogma-" -e "COMMIT=3a205e7988a15a682f5b9858c9eec089b25a9f9a" -it ogma-verify-55
Adapt the cabal files and the code to work with GHC 9.2, as prescribed in the solution proposed for #55.