From 3e51579564044e8ecf43f0dcf77f2743f409a0a9 Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 9 Jul 2026 12:56:24 +0200 Subject: [PATCH] fix(desktop-environments): missing EWW build dep + non-idempotent clone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found via a fresh-install test in a QEMU VM using the repo's answerfile system (hyprlua, tablet/touch eww bar variant). 1. hyprlua.sh/hyprland.sh/niri.sh all compile EWW (GTK3) from source but never installed gtk-layer-shell — only gtk4-layer-shell, which is a separate package for astal-menu's GTK4 surface. Every fresh install failed at the gtk-layer-shell-sys build script with a pkg-config error ("gtk-layer-shell-0 ... was not found"). 2. The EWW `git clone` isn't idempotent: a leftover ~/install-tmp/eww from an earlier interrupted/retried install (e.g. the failure above) makes the next clone abort with "already exists and is not an empty directory", killing the whole script under set -e. `rm -rf eww` before cloning fixes retries. Both reproduced and fixed directly in the test VM before being applied here: installing gtk-layer-shell and clearing the stale checkout let the same run complete successfully. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6 --- setup/modules/Desktop-Environments/hyprland.sh | 8 ++++++++ setup/modules/Desktop-Environments/hyprlua.sh | 9 +++++++++ setup/modules/Desktop-Environments/niri.sh | 8 +++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/setup/modules/Desktop-Environments/hyprland.sh b/setup/modules/Desktop-Environments/hyprland.sh index 7bc65ff..a6596e8 100755 --- a/setup/modules/Desktop-Environments/hyprland.sh +++ b/setup/modules/Desktop-Environments/hyprland.sh @@ -141,6 +141,11 @@ HYPRLAND_PACKAGES=( playerctl # MPRIS media player controller (play/pause CLI) wf-recorder # screen recorder for wlroots compositors sound-theme-freedesktop # standard freedesktop sound event library + + # EWW (compiled from source below) is GTK3, and its gtk-layer-shell-sys + # crate links against this library at build time — without it, `cargo + # build` fails at that build script with a pkg-config error. + gtk-layer-shell ) sudo pacman -Syu --noconfirm --needed -- "${HYPRLAND_PACKAGES[@]}" @@ -244,6 +249,9 @@ log "Compiling EWW..." # ~/install-tmp is a staging area for source trees fetched during installation. mkdir -p ~/install-tmp cd ~/install-tmp +# A leftover checkout from an earlier interrupted/retried install would make +# a plain `git clone` fail with "already exists and is not an empty directory". +rm -rf eww git clone https://github.com/elkowar/eww cd eww # --release → optimised binary (significantly faster than debug) diff --git a/setup/modules/Desktop-Environments/hyprlua.sh b/setup/modules/Desktop-Environments/hyprlua.sh index c2a31fe..d09f216 100755 --- a/setup/modules/Desktop-Environments/hyprlua.sh +++ b/setup/modules/Desktop-Environments/hyprlua.sh @@ -79,6 +79,12 @@ HYPRLUA_PACKAGES=( gtk4 # GTK4 toolkit (the menu's frontend) gtk4-layer-shell # wlr-layer-shell for GTK4 (the popup surface) libshumate # GTK4 OpenStreetMap widget (Location quad) + # EWW itself (compiled from source below) is GTK3, and its + # gtk-layer-shell-sys crate links against the GTK3 build of this library — + # a separate package from gtk4-layer-shell above. Without it, `cargo build` + # fails at the gtk-layer-shell-sys build script with a pkg-config error + # ("gtk-layer-shell-0 ... was not found"). + gtk-layer-shell # wlr-layer-shell for GTK3 (EWW's build dependency) networkmanager # nmcli backend for the Network quad (adapters/routes/vlan/dns) bluez-utils # bluetoothctl + bluez CLI (Bluetooth quad fallbacks) iproute2 curl jq # ip/ss, HTTP fetches, JSON (Network/Weather backends) @@ -257,6 +263,9 @@ log "Compiling EWW..." # ~/install-tmp is the staging directory for source trees fetched during install. mkdir -p ~/install-tmp cd ~/install-tmp +# A leftover checkout from an earlier interrupted/retried install would make +# a plain `git clone` fail with "already exists and is not an empty directory". +rm -rf eww git clone https://github.com/elkowar/eww cd eww # --release → produce an optimised binary (noticeably faster UI) diff --git a/setup/modules/Desktop-Environments/niri.sh b/setup/modules/Desktop-Environments/niri.sh index 6cc3c77..face325 100755 --- a/setup/modules/Desktop-Environments/niri.sh +++ b/setup/modules/Desktop-Environments/niri.sh @@ -27,7 +27,10 @@ sudo pacman -Syu --noconfirm --needed \ thunar tumbler thunar-archive-plugin thunar-shares-plugin thunar-volman \ pcmanfm-qt udisks2 ly kew \ pavucontrol playerctl wf-recorder sound-theme-freedesktop \ - xinput jq python-opencv v4l-utils + xinput jq python-opencv v4l-utils \ + gtk-layer-shell # GTK3 wlr-layer-shell library EWW's gtk-layer-shell-sys + # crate links against; without it `cargo build` below + # fails at that build script with a pkg-config error. # 3. Enable essential services log "Enabling essential services..." @@ -72,6 +75,9 @@ esac log "Compiling EWW..." mkdir -p ~/install-tmp cd ~/install-tmp +# A leftover checkout from an earlier interrupted/retried install would make +# a plain `git clone` fail with "already exists and is not an empty directory". +rm -rf eww git clone https://github.com/elkowar/eww cd eww cargo build --release --no-default-features --features=wayland