diff options
| author | 2026-05-14 12:29:15 +0100 | |
|---|---|---|
| committer | 2026-05-14 12:29:15 +0100 | |
| commit | 8e5f5efc70680128545d26864263e5628fc74276 (patch) | |
| tree | 6e5584f0a18b1f22913f42f3dce273fcf3803afc | |
| parent | 5071c9ed1063e1739f26b8227c521d070ef525d6 (diff) | |
| download | dotfiles-8e5f5efc70680128545d26864263e5628fc74276.tar.gz dotfiles-8e5f5efc70680128545d26864263e5628fc74276.tar.bz2 dotfiles-8e5f5efc70680128545d26864263e5628fc74276.zip | |
fix(remote-dev): install basedpyright outside Mason
Mason's pypi distribution of basedpyright pulls nodejs-wheel-binaries
which only ships manylinux_2_28 Linux wheels. uv's python-build-
standalone interpreter is tagged manylinux2014 (glibc 2.17 for max
portability) and rejects those wheels; pip then falls back to building
Node 24 from source, which fails on Ubuntu 20.04's gcc 9.4 (needs
gcc >=10 for -std=gnu++20).
Provide basedpyright via the system package manager instead:
- pacman on Arch (added to meta/base.txt)
- pkgs.basedpyright on the VM (added to remote-dev/home.nix)
Drop it from mason-tool-installer's ensure_installed; lspconfig picks
it up from PATH. Document the exception in remote-dev/README.md.
| -rw-r--r-- | dot_config/nvim/lua/plugins/lsp.lua | 7 | ||||
| -rw-r--r-- | meta/base.txt | 1 | ||||
| -rw-r--r-- | remote-dev/README.md | 28 | ||||
| -rw-r--r-- | remote-dev/home.nix | 4 |
4 files changed, 28 insertions, 12 deletions
diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua index 1a115db..a2a4036 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -22,7 +22,12 @@ require("mason-tool-installer").setup({ ensure_installed = { "actionlint", "autotools-language-server", - "basedpyright", + -- basedpyright: provided by the system pkg manager (basedpyright-bin from + -- AUR on Arch, pkgs.basedpyright in remote-dev/home.nix on the VM). Mason's pypi + -- distro pulls `nodejs-wheel-binaries` whose Linux wheels are only + -- manylinux_2_28; uv's standalone python (manylinux2014) rejects them and + -- pip falls back to building Node from source, which fails on Ubuntu + -- 20.04's gcc 9.4 (<10, no -std=gnu++20). lspconfig finds it on PATH. "bash-language-server", "clangd", "codelldb", diff --git a/meta/base.txt b/meta/base.txt index b88c5f3..57a79a1 100644 --- a/meta/base.txt +++ b/meta/base.txt @@ -89,6 +89,7 @@ nix # --- dev --- android-tools +basedpyright-bin ccache clang cmake diff --git a/remote-dev/README.md b/remote-dev/README.md index 00640b5..2e92509 100644 --- a/remote-dev/README.md +++ b/remote-dev/README.md @@ -135,18 +135,24 @@ git log --show-signature -1 from GitHub on first start. Mason will also fetch LSP servers using `nodejs`/`uv` from this profile. - **Mason pip installs need a managed `python3.11`**: a handful of Mason - packages (basedpyright, autotools-language-server, codespell, mdformat, + packages (autotools-language-server, codespell, mdformat, nginx-language-server, systemdlint, yamllint) install themselves into - per-pkg venvs via pip. Ubuntu 20.04's `/usr/bin/python3` is 3.8 (too - old; also `basedpyright` pulls `nodejs-wheel-binaries` whose only - Linux wheels are manylinux — rejected by Nix's python, which forces a - source build that needs gcc 12+). `bootstrap.sh` runs `uv python -install 3.11` (uv is in the nix profile) and symlinks the resulting - binary to `~/.local/bin/python3.11`. It's a portable manylinux-aware - CPython, and the versioned name leaves `/usr/bin/python3` untouched. - On an existing VM run `uv python install 3.11 && ln -sf "$(uv python -find 3.11)" ~/.local/bin/python3.11` once, then `:MasonToolsInstall` - (or `:MasonInstallAll`) in nvim. + per-pkg venvs via pip. Ubuntu 20.04's `/usr/bin/python3` is 3.8 — too + old. `bootstrap.sh` runs `uv python install 3.11` (uv is in the nix + profile) and symlinks the resulting binary to + `~/.local/bin/python3.11`. The versioned name leaves + `/usr/bin/python3` untouched. On an existing VM run + `uv python install 3.11 && ln -sf "$(uv python find 3.11)" ~/.local/bin/python3.11` + once, then `:MasonToolsInstall` (or `:MasonInstallAll`) in nvim. +- **`basedpyright` is provided by nix, not Mason**: its pypi distro + pulls `nodejs-wheel-binaries`, which ships only `manylinux_2_28` + Linux wheels. Neither Nix's python nor uv's standalone + (`manylinux2014`-tagged) accepts those, so pip falls back to + compiling Node 24 from source — which fails on Ubuntu 20.04's + gcc 9.4 (needs gcc ≥10 for `-std=gnu++20`). `home.nix` adds + `pkgs.basedpyright`; the matching AUR package (`basedpyright-bin`) + is in `meta/base.txt` for Arch. `mason-tool-installer` no longer tries + to install it (see `dot_config/nvim/lua/plugins/lsp.lua`). - **Ubuntu apt collisions**: Nix-installed binaries appear first in PATH. The leaf-tools policy above exists precisely to keep this shadowing contained to harmless tools. diff --git a/remote-dev/home.nix b/remote-dev/home.nix index 1a1b98f..cdb5890 100644 --- a/remote-dev/home.nix +++ b/remote-dev/home.nix @@ -85,6 +85,10 @@ in nodejs_24 # Mason npm LSPs + copilot-language-server (needs Node 24, see ai.lua) uv # Mason python LSPs in isolated venvs; brings `uv`/`uvx` only jre # for Mason's groovy-language-server (headless Java runtime) + basedpyright # see lsp.lua: Mason's pypi distro can't install on Ubuntu 20.04 + # (nodejs-wheel-binaries has only manylinux_2_28 wheels which + # uv's python rejects since it's manylinux2014; source build + # of Node 24 needs gcc >=10 and host gcc is 9.4) # NB: python3.11 for Mason is NOT installed here — see bootstrap.sh # step 4. Nix's python disables manylinux wheel support by design |
