Commit8e4dcdebRecorded20 Sep 2026Repositorysigil-app

Add Guix manifests for building and for running on Wayland and X11

Changed
 guix/build.scm       | 11 +++++++++++
 guix/run-wayland.scm | 26 ++++++++++++++++++++++++++
 guix/run-x11.scm     | 15 +++++++++++++++
 3 files changed, 52 insertions(+)
Diff
guix/build.scmadded
@@ -0,0 +1,11 @@
+1
;; Headers a Guix build of this package (and of anything that depends on it)
+2
;; needs at compile time. GLFW compiles against the X11 and Wayland headers
+3
;; even though it links none of them:
+4
;;
+5
;; guix shell -m guix/build.scm -- sh -c 'CPATH=$GUIX_ENVIRONMENT/include sigil build'
+6
;;
+7
;; A consumer that also builds sigil-graphics adds mesa and libglvnd for
+8
;; GL/gl.h (compile time only; keep libglvnd out of the run manifests).
+9
(specifications->manifest
+10
'("libx11" "libxcursor" "libxrandr" "libxinerama" "libxi" "libxext" "xorgproto"
+11
"wayland" "libxkbcommon"))
guix/run-wayland.scmadded
@@ -0,0 +1,26 @@
+1
;; Runtime packages for a sigil-app game as a native Wayland client on Guix:
+2
;;
+3
;; guix shell --pure -m guix/run-wayland.scm -- ./build/release/bin/<game>
+4
;;
+5
;; GLFW loads every platform library at run time by soname; sigil-app's
+6
;; dlopen (src/c/dl-search.c) looks in $GUIX_ENVIRONMENT/lib, which guix
+7
;; shell sets, so no LD_LIBRARY_PATH is needed for these. Three packages:
+8
;;
+9
;; mesa libEGL.so.1 and the GL driver (llvmpipe or the GPU's)
+10
;; wayland libwayland-client.so.0, libwayland-cursor.so.0, libwayland-egl.so.1
+11
;; libxkbcommon libxkbcommon.so.0, the keyboard map
+12
;;
+13
;; Not listed: libdecor (client-side decorations for compositors without
+14
;; xdg-decoration, i.e. GNOME; it adds ~850 MiB of GTK to the closure and
+15
;; sway/KDE/wlroots compositors decorate server-side), and libglvnd (Guix's
+16
;; mesa is built without glvnd, and a vendorless libGLX.so.0 on the path
+17
;; makes GLFW's GLX fail with "No GLXFBConfigs returned").
+18
;;
+19
;; Until sigil-graphics loads GL through glfwGetProcAddress and sigil-audio
+20
;; moves to miniaudio, a game binary still has libGL.so.1 and libasound.so.2
+21
;; as NEEDED entries; those are resolved by the loader before main and need
+22
;; LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib (add alsa-lib to this list).
+23
(specifications->manifest
+24
'("mesa"
+25
"wayland"
+26
"libxkbcommon"))
guix/run-x11.scmadded
@@ -0,0 +1,15 @@
+1
;; Runtime packages for a sigil-app game under X11 (or XWayland) on Guix:
+2
;;
+3
;; guix shell --pure -m guix/run-x11.scm -- ./build/release/bin/<game>
+4
;;
+5
;; GLFW needs libX11.so.6 and libGL.so.1 (GLX); everything else it loads is
+6
;; optional and degrades cleanly when absent: libXcursor (custom cursors),
+7
;; libXi (raw mouse motion), libXrandr (monitor modes), libXinerama,
+8
;; libXrender, libXext (shape). mesa's own closure already brings libX11's
+9
;; store item in, but the profile's lib/ only holds packages listed here,
+10
;; so libx11 is named explicitly.
+11
;;
+12
;; See run-wayland.scm for why libglvnd must not be here.
+13
(specifications->manifest
+14
'("mesa"
+15
"libx11"))