From a4bb3e85e80089bf2d8dd30a45df3247c4080471 Mon Sep 17 00:00:00 2001 From: Christopher Sasarak Date: Fri, 18 Apr 2025 15:57:38 -0500 Subject: [PATCH] Build a ghc-9.8.4 image. --- ghc-9.8.4/Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ghc-9.8.4/Dockerfile diff --git a/ghc-9.8.4/Dockerfile b/ghc-9.8.4/Dockerfile new file mode 100644 index 0000000..c86a71d --- /dev/null +++ b/ghc-9.8.4/Dockerfile @@ -0,0 +1,42 @@ +FROM alpine:3.18 +# Install deps for: +# - ghc/cabal: curl gcc g++ gmp-dev ncurses-dev libffi-dev make xz tar perl zlib-dev +# - repo clone: git +# - static builds: zlib-static HACK(broken-ghc-musl): ncurses-static +# - random haskell libraries with cbits (basement): binutils-gold +# - to use embedded binaries in development (ie themis): libc6-compat +# - for nix installation via github action cachix/install-nix-action: sudo +RUN apk --no-cache add binutils-gold curl gcc g++ git gmp-dev ncurses-dev ncurses-static libffi-dev make xz xz-static tar perl zlib-dev zlib-static bash sudo libc6-compat git-lfs + +# Install system deps for FOSSA CLI: +RUN apk --no-cache add bash xz-libs xz-dev bzip2-dev bzip2-static upx curl jq + +ENV GHC_VERSION="9.8.4" + +ENV PATH="/root/.cabal/bin:/root/.ghcup/bin:$PATH" + +# There aren't official builds of ghcup that are built against musl for aarch64. +# So the following two steps do the install manually on that platform. +# They manually do the same steps that ghcup would. +# ghcup should have support for this soon: https://github.com/haskell/ghcup-hs/issues/1012#issuecomment-2294829976 +# When that happens, you should be able to remove the 'else' branches and have the install work for all platforms. +RUN <