aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/remote-dev/bootstrap.sh
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-14 12:05:10 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-14 12:05:10 +0100
commit1589910f1319c1806bbfaf47c73a80cbcee8fafb (patch)
tree57f4dd8ac98e0394b7c62e54f7cea24284f2ac36 /remote-dev/bootstrap.sh
parente20942db608da333482d7485f123342962e1127a (diff)
downloaddotfiles-1589910f1319c1806bbfaf47c73a80cbcee8fafb.tar.gz
dotfiles-1589910f1319c1806bbfaf47c73a80cbcee8fafb.tar.bz2
dotfiles-1589910f1319c1806bbfaf47c73a80cbcee8fafb.zip
fix(remote-dev): use deadsnakes python3.11 instead of nix for Mason
Nix's python rejects manylinux wheels by design (its libc is patched), which forced pip in Mason's per-pkg venvs to compile nodejs-wheel-binaries (pulled in by basedpyright) from source. That source build then failed on Ubuntu 20.04's gcc 9.4 — Node 24 requires C++20 (g++ >= 12.2.0). Replace the nix python311-versioned-only derivation with an Ubuntu-native python3.11 from the deadsnakes PPA. It satisfies Mason's >=3.10 version requirement, accepts manylinux wheels, and the versioned binary name leaves /usr/bin/python3 untouched (leaf-tools policy preserved).
Diffstat (limited to 'remote-dev/bootstrap.sh')
-rwxr-xr-xremote-dev/bootstrap.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/remote-dev/bootstrap.sh b/remote-dev/bootstrap.sh
index 157c902..5ca4fe3 100755
--- a/remote-dev/bootstrap.sh
+++ b/remote-dev/bootstrap.sh
@@ -36,16 +36,25 @@ fi
# ── 1b. Mason prerequisites from apt ──────────────────────────────────────────
# Mason (in neovim) installs some LSPs/linters via pip into per-package venvs.
-# Ubuntu ships python3 without the venv module by default, so without
-# python3-venv every pip-based Mason package silently fails to install.
-# Affected: autotools-language-server, codespell, mdformat, nginx-language-server,
-# systemdlint. We deliberately don't pull python3 into the Nix profile (it
-# would shadow Ubuntu's and break system builds — see remote-dev/home.nix).
+# We need a python3.11 that (a) meets Mason's >=3.10 version requirement
+# (Ubuntu 20.04's /usr/bin/python3 is 3.8 — too old) and (b) accepts
+# manylinux wheels. Nix's python rejects manylinux wheels by design (its
+# libc is patched), which forces pip to compile `nodejs-wheel-binaries`
+# (pulled in by basedpyright) from source — that build then fails on
+# Ubuntu 20.04's gcc 9.4 (no C++20 support).
+#
+# Solution: install python3.11 from the deadsnakes PPA. It's Ubuntu-native
+# with full manylinux acceptance, and the versioned binary (python3.11)
+# does NOT shadow the system /usr/bin/python3 — leaf-tools policy intact.
if command -v sudo >/dev/null 2>&1 && command -v apt-get >/dev/null 2>&1; then
- if ! dpkg -s python3-venv >/dev/null 2>&1; then
- log "Installing python3-venv via apt (required for Mason pip installs)…"
+ if ! command -v python3.11 >/dev/null 2>&1; then
+ log "Installing python3.11 from deadsnakes PPA (required for Mason pip installs)…"
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
+ software-properties-common
+ sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update -qq
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq python3-venv
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
+ python3.11 python3.11-venv
fi
fi