Skip to content

Instantly share code, notes, and snippets.

@TerrorJack
Last active March 18, 2024 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TerrorJack/0ff3f18be5611dcae7c6d6e321fd357f to your computer and use it in GitHub Desktop.
Save TerrorJack/0ff3f18be5611dcae7c6d6e321fd357f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
apt update
apt install -y automake build-essential curl git gnupg libffi-dev libncurses-dev libgmp-dev python3 libdw-dev
curl -f -L --retry 5 https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-snapshot.gpg
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-18 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-17 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-16 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-15 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-14 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-13 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-12 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/bullseye llvm-toolchain-bullseye-11 main" >> /etc/apt/sources.list.d/llvm-toolchain.list
apt update
apt full-upgrade -y
apt install -y clang-18 lld-18
export PATH=$PATH:/usr/lib/llvm-18/bin
curl -f -L --retry 5 https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_GHC_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_NONINTERACTIVE=1 GHCUP_USE_XDG_DIRS=1 AR=/usr/lib/llvm-18/bin/llvm-ar CC=/usr/lib/llvm-18/bin/clang CONF_CC_OPTS_STAGE2="-Wno-unused-command-line-argument" CONF_CXX_OPTS_STAGE2="-Wno-unused-command-line-argument" CONF_GCC_LINKER_OPTS_STAGE2="--ld-path=/usr/lib/llvm-18/bin/ld.lld" CXX=/usr/lib/llvm-18/bin/clang++ LD="/usr/lib/llvm-18/bin/ld.lld" RANLIB=/usr/lib/llvm-18/bin/llvm-ranlib bash -eo pipefail
. ~/.local/share/ghcup/env
cabal install alex happy
#!/bin/sh
exec podman run -it --rm --init --tmpfs /tmp:exec --network host --privileged -v $PWD:/workspace -w /workspace --arch 386 debian:bullseye-backports setarch i386 bash -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment