Skip to content
Snippets Groups Projects
Verified Commit cf9397a3 authored by Olivier Benz's avatar Olivier Benz
Browse files

Merge branch 'main' into freeze-version

parents a40ff731 3b2268b3
No related branches found
No related tags found
No related merge requests found
Pipeline #25884 passed
......@@ -106,7 +106,7 @@ ARG STACK_VERSION_OVERRIDE=${STACK_VERSION}
ENV HLS_VERSION=${HLS_VERSION} \
STACK_VERSION=${STACK_VERSION_OVERRIDE:-$STACK_VERSION}
RUN if dpkg --compare-versions "${GHC_VERSION%.*}" le "9.2"; then \
RUN if dpkg --compare-versions "$GHC_VERSION" lt "9.2.8"; then \
if [ -f /usr/local/bin/stack ]; then \
mv -f /usr/local/bin/stack /usr/bin/; \
fi \
......
......@@ -109,7 +109,7 @@ RUN if [ -n "$STACK_VERSION_OVERRIDE" ]; then \
curl -sSLO https://github.com/commercialhaskell/stack/releases/download/v"$STACK_VERSION"/stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz.sha256; \
sha256sum -cs stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz.sha256; \
tar -xzf stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz; \
if dpkg --compare-versions "${GHC_VERSION%.*}" le "9.2"; then \
if dpkg --compare-versions "$GHC_VERSION" lt "9.2.8"; then \
mv -f stack-"$STACK_VERSION"-linux-"$(uname -m)"/stack /usr/bin/stack; \
else \
mv -f stack-"$STACK_VERSION"-linux-"$(uname -m)"/stack /usr/local/bin/stack; \
......
......@@ -19,7 +19,7 @@ The tools in the Haskell Toolchain are installed at `/usr/local/bin`
[^1]: `PATH=$HOME/.cabal/bin:$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`
[^2]: Installed at `/usr/bin` for GHC versions 9.2.x.
[^2]: Some of them installed at `/usr/bin` for GHC versions < 9.2.8.
| :information_source: Executables installed with Cabal (at `$HOME/.cabal/bin` or `$HOME/.local/bin`) or Stack or Pip (at `$HOME/.local/bin`)<br>take precedence over the same executable installed at `/usr/local/sbin`, `/usr/local/bin`, etc.|
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
......
......@@ -130,7 +130,7 @@ RUN cd /tmp \
## Install GHC
&& tar -xJf ghc-"$GHC_VERSION"-*-alpine-linux.tar.xz \
&& cd "ghc-$GHC_VERSION" \
&& ./configure --disable-ld-override --prefix=/usr \
&& ./configure --disable-ld-override --prefix=/usr/local \
&& make install \
## Install Stack
&& cd /tmp \
......@@ -138,15 +138,15 @@ RUN cd /tmp \
&& curl -sSLO https://github.com/commercialhaskell/stack/releases/download/v"$STACK_VERSION"/stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz.sha256 \
&& sha256sum -cs stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz.sha256 \
&& tar -xzf stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz \
&& mv stack-"$STACK_VERSION"-linux-"$(uname -m)"/stack /usr/bin/stack \
&& mv stack-"$STACK_VERSION"-linux-"$(uname -m)"/stack /usr/local/bin/stack \
## Clean up
&& rm -rf /tmp/* \
"/usr/share/doc/ghc-$GHC_VERSION"/*
"/usr/local/share/doc/ghc-$GHC_VERSION"/*
FROM ghc-stage1 as ghc-stage2
## Install Cabal (the tool) built with the GHC bootstrap version
COPY --from=bootstrap-cabal /root/.cabal/bin/cabal /usr/bin/cabal
COPY --from=bootstrap-cabal /root/.cabal/bin/cabal /usr/local/bin/cabal
## Rebuild Cabal (the tool) with the GHC target version
RUN cabal update \
......@@ -157,7 +157,7 @@ FROM ghc-stage1 as test
WORKDIR /usr/local/src
## Install Cabal (the tool) built with the GHC target version
COPY --from=ghc-stage2 /root/.cabal/bin/cabal /usr/bin/cabal
COPY --from=ghc-stage2 /root/.cabal/bin/cabal /usr/local/bin/cabal
COPY Main.hs Main.hs
......@@ -174,9 +174,9 @@ RUN ghc -static -optl-pthread -optl-static Main.hs \
FROM ghc-base
## Install GHC and Stack
COPY --from=ghc-stage1 /usr /usr
COPY --from=ghc-stage1 /usr/local /usr/local
## Install Cabal (the tool) built with the GHC target version
COPY --from=ghc-stage2 /root/.cabal/bin/cabal /usr/bin/cabal
COPY --from=ghc-stage2 /root/.cabal/bin/cabal /usr/local/bin/cabal
CMD ["ghci"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment