From 64676624e6322ad188e9f00c0993c5aedc637262 Mon Sep 17 00:00:00 2001 From: janik Date: Thu, 23 Jul 2026 15:32:46 +0700 Subject: [PATCH] NixOS: steam-run alone is one library short of a working Qt Field-tested: under steam-run the PySide6 wheel loads, but Qt aborts at platform-plugin init - the Steam runtime predates Qt 6.5, which hard-requires libxcb-cursor0 for xcb (and its wayland stack is too old for the wayland plugin). Document the working invocation: point LD_LIBRARY_PATH at xcb-util-cursor on top of steam-run, or build a proper buildFHSEnv wrapper. Co-Authored-By: Claude Fable 5 --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b4c6c4d..9f67374 100644 --- a/README.md +++ b/README.md @@ -95,11 +95,19 @@ OS specifics are spelled out per step and in *Platform notes* below. **NixOS**: pip's Linux wheels link against standard FHS library paths, which NixOS does not provide — PySide6 fails with `libgthread-2.0.so.0: cannot open shared object file`. The plugin - cannot fix this from inside its venv (KiCad installs wheels only): - run KiCad inside an FHS environment (e.g. `steam-run kicad`) or - enable `programs.nix-ld` with Qt's runtime libraries (glib, - fontconfig, freetype, dbus, libGL, libxkbcommon and the X11/xcb - set). + cannot fix this from inside its venv (KiCad installs wheels only); + run KiCad inside an FHS environment. `steam-run kicad` alone is + **not** enough: its runtime predates Qt 6.5's hard requirement for + `libxcb-cursor0`, so Qt aborts with *"no Qt platform plugin could + be initialized"*. Supply that one library on top: + ```sh + XCBCUR=$(nix build --no-link --print-out-paths nixpkgs#xcb-util-cursor) + QT_QPA_PLATFORM=xcb LD_LIBRARY_PATH=$XCBCUR/lib steam-run kicad + ``` + or build a dedicated FHS wrapper with `buildFHSEnv` whose + `targetPkgs` include `kicad`, `xcb-util-cursor`, `glib`, + `fontconfig`, `freetype`, `dbus`, `libGL`, `libxkbcommon`, + `wayland` and the `xorg` X11/xcb libraries. ## Usage