From e8f0b8dbbaf8b4e1bc077a362b9380add0a2fa82 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Tue, 25 Jun 2024 13:13:04 +0100 Subject: [PATCH] Install haskell and align versions --- Dockerfile.bindings | 10 ++++++++-- dev/proto-generate.sh | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile.bindings b/Dockerfile.bindings index c6f7f2f0..9bca4069 100644 --- a/Dockerfile.bindings +++ b/Dockerfile.bindings @@ -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" @@ -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 && \ @@ -25,7 +30,8 @@ RUN asdf plugin add nodejs && \ COPY .tool-versions . -RUN asdf install +RUN asdf install + WORKDIR /src diff --git a/dev/proto-generate.sh b/dev/proto-generate.sh index 1ca6be37..e1694bfb 100755 --- a/dev/proto-generate.sh +++ b/dev/proto-generate.sh @@ -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"