Skip to content

Commit

Permalink
[sc-39654] Add ghciwatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok committed Oct 30, 2024
1 parent eb5da39 commit 63d7148
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ ARG BOOTSTRAP_HASKELL_MINIMAL=1
ARG BOOTSTRAP_HASKELL_NONINTERACTIVE=1
ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local

ADD install-tools.sh /install-tools.sh

RUN apt-get update \
&& apt-get install -qq -y --no-install-recommends \
curl build-essential git-all libffi-dev libffi8 libgmp-dev \
Expand Down Expand Up @@ -45,4 +43,6 @@ ARG CABAL_VERSION
RUN ghcup install cabal $CABAL_VERSION --set

ADD stack.yaml /stack.yaml
RUN /bin/sh /install-tools.sh

ADD install-tools.sh /install-tools.sh
RUN bash /install-tools.sh
11 changes: 11 additions & 0 deletions install-tools.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
set -o errexit

arch=$(uname -m)
if [[ $arch == x86_64 ]]; then
curl -Lo /usr/local/bin/ghciwatch "https://github.com/MercuryTechnologies/ghciwatch/releases/download/v1.0.1/ghciwatch-x86_64-linux"
elif [[ $arch == aarch64 ]]; then
curl -Lo /usr/local/bin/ghciwatch "https://github.com/MercuryTechnologies/ghciwatch/releases/download/v1.0.1/ghciwatch-aarch64-linux"
else
echo "install-tools.sh: Unknown architecture $arch"
exit 1
fi
chmod +x /usr/local/bin/ghciwatch

stack install \
--local-bin-path /usr/local/bin \
weeder \
Expand Down

0 comments on commit 63d7148

Please sign in to comment.