Skip to content

Instantly share code, notes, and snippets.

@TerrorJack
Last active May 26, 2024 12:32
Show Gist options
  • 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
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 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" bash -eo pipefail
. ~/.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