#!/bin/sh

# Debian bootstrap for archinstoo. Mainly to test in docker.
#
# archinstoo needs python 3.14.

set -e
export DEBIAN_FRONTEND=noninteractive

apt-get update

# shellcheck disable=SC2046
apt-get install --no-install-recommends -y $(
	awk '{print $1}' <<'EOF'
    ca-certificates             # https support
    python3.14                  # runtime
    python3.14-venv             # venv + ensurepip for 3.14
    python3.14-dev              # python headers (pyparted build)
    libparted-dev               # libparted headers (pyparted build)
    libcrypt-dev                # libcrypt.so symlink (crypt.py dlopen)
    gcc                         # c compiler (pyparted build)
    pacman-package-manager      # arch package manager
    makepkg                     # pacman-key depends on makepkg utils
    arch-install-scripts        # pacstrap, genfstab, etc
    coreutils                   # gnu core utils
    util-linux                  # lsblk, blkid, etc
    pciutils                    # lspci
    tzdata                      # timezone data
    dosfstools                  # mkfs.fat
    dmsetup                     # dm-* devices
    e2fsprogs                   # mkfs.ext4
    cryptsetup-bin              # luks
    lvm2
    btrfs-progs
    f2fs-tools
    xfsprogs                    # mkfs.xfs
EOF
)

update-alternatives --install /usr/bin/python python /usr/bin/python3.14 1
