Skip to content

Commit

Permalink
Install haskell and align versions
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Jun 25, 2024
1 parent 46b170c commit e8f0b8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Dockerfile.bindings
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ FROM ubuntu:jammy
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -q && apt-get install -y git curl xz-utils tar gpg build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev \
libncursesw5-dev tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
libncursesw5-dev tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
libffi8 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 pkg-config

RUN adduser --shell /bin/bash --home /asdf --disabled-password asdf
ENV PATH="${PATH}:/asdf/.asdf/shims:/asdf/.asdf/bin"
Expand All @@ -15,6 +16,10 @@ RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git $HOME/.asdf && \

RUN . ~/.bashrc

# YOLO
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

ENV PATH="${PATH}:/asdf/.ghcup/bin"

RUN asdf plugin add nodejs && \
asdf plugin add golang && \
Expand All @@ -25,7 +30,8 @@ RUN asdf plugin add nodejs && \

COPY .tool-versions .

RUN asdf install
RUN asdf install


WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion dev/proto-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi

echo "--- Haskell ---"
command -v cabal > /dev/null 2>&1 || { echo >&2 "Haskell's 'cabal' command is not installed. Please install it first via https://www.haskell.org/ghcup/"; exit 1; }
cabal install proto-lens-protoc-0.7.1.1 ghc-source-gen-0.4.3.0 --overwrite-policy=always --ghc-options='-j2 +RTS -A32m' --installdir="$PWD/.bin"
cabal install proto-lens-protoc-0.8.0.1 ghc-source-gen-0.4.5.0 --overwrite-policy=always --ghc-options='-j2 +RTS -A32m' --installdir="$PWD/.bin"
# buf requires the generator to be named protoc-gen-*
ln -sfv "$PWD/.bin/proto-lens-protoc" "$PWD/.bin/protoc-gen-haskell"
PATH="$PWD/.bin:$PATH"
Expand Down

0 comments on commit e8f0b8d

Please sign in to comment.