Commit5b9e755cRecorded20 Sep 2026Repositorysigil-app
Review fixes: name: on the consumer's own line, manifest comments, gating test
Message
From the adversarial review of the Phase B diffs:
- Both upgrade notes now say the consumer must put name: "sigil-desktop" on its OWN dependency line until the Codeberg rename: sigil-build keys a dependency by the name it derives from the URL, so a line without it beside a sigil-graphics that has it installs the repository twice (sigil-app 0.9 and sigil-desktop 0.10 side by side, two window stacks, a duplicate slog_func).
- guix/run-wayland.scm, run-x11.scm and build.scm no longer describe the Phase A state (libGL NEEDED, libglvnd for headers); the stack has no GL headers and links no libGL.
- The search summary names the nix-shell rows as they work (each root + /lib); test/dl-search-test.sh gains the negative arm for the IN_NIX_SHELL gate.
Changed
CHANGELOG.md | 14 +++++++++++---
guix/build.scm | 5 +++--
guix/run-wayland.scm | 19 ++++++++++---------
guix/run-x11.scm | 2 +-
src/c/dl-search.c | 4 ++--
test/dl-search-test.sh | 8 +++++++-
6 files changed, 34 insertions(+), 18 deletions(-)Diff
CHANGELOG.mdmodified
@@ -66,9 +66,17 @@ sokol_app.
66
67
### Upgrade notes 68
−69
- Relock to `^0.10.0`, delete the consumer's `build/` once (a stale−70
`sokol-app.o` otherwise stays in the archive), then rename `(sigil app)`−71
imports to `(sigil desktop)` before 0.11.+69
- **Relock with the new name on your own line.** Until the Codeberg+70
repository rename, write+71
`(from-git url: "codeberg:sigil/sigil-app" name: "sigil-desktop" version: "^0.10.0")`;+72
sigil-build keys a dependency by the name it derives from the URL, so a+73
line without `name:` next to a sigil-graphics that says `name:` installs+74
the repository twice (`sigil-app` 0.9 beside `sigil-desktop` 0.10, two+75
window stacks, a duplicate `slog_func` at link time). After the rename+76
the URL becomes `codeberg:sigil/sigil-desktop` and `name:` can go.+77
- Delete the consumer's `build/` once (a stale `sokol-app.o` otherwise+78
stays in the old archive), then rename `(sigil app)` imports to+79
`(sigil desktop)` before 0.11. 80
- The Codeberg repository is renamed `sigil/sigil-app` to 81
`sigil/sigil-desktop`; the old URL redirects. 82
guix/build.scmmodified
@@ -4,8 +4,9 @@
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).+7
;; No GL headers anywhere in the stack: sigil-graphics 0.11.4 loads GL+8
;; through sigil-desktop's proc loader from a generated header. Keep+9
;; libglvnd out of every manifest that is also a run environment. 10
(specifications->manifest 11
'("libx11" "libxcursor" "libxrandr" "libxinerama" "libxi" "libxext" "xorgproto" 12
"wayland" "libxkbcommon"))guix/run-wayland.scmmodified
@@ -1,12 +1,12 @@
−1
;; Runtime packages for a sigil-app game as a native Wayland client on Guix:+1
;; Runtime packages for a sigil-desktop 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:+5
;; GLFW loads every platform library at run time by soname, and+6
;; sigil-desktop's dlopen (src/c/dl-search.c) looks in $GUIX_ENVIRONMENT/lib,+7
;; which guix shell sets, so no LD_LIBRARY_PATH is needed. Three packages: 8
;;−9
;; mesa libEGL.so.1 and the GL driver (llvmpipe or the GPU's)+9
;; mesa libEGL.so.1, libGL.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
;;@@ -16,10 +16,11 @@
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).+19
;; With sigil-graphics 0.11.4 (GL loaded through sigil-desktop) a game's+20
;; NEEDED list is libm and libc plus whatever sigil-audio links; until+21
;; sigil-audio stops linking libasound, add alsa-lib here and set+22
;; LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib for that one library (NEEDED+23
;; entries are resolved before main and the dlopen fallback cannot help). 24
(specifications->manifest 25
'("mesa" 26
"wayland"guix/run-x11.scmmodified
@@ -1,4 +1,4 @@
−1
;; Runtime packages for a sigil-app game under X11 (or XWayland) on Guix:+1
;; Runtime packages for a sigil-desktop game under X11 (or XWayland) on Guix: 2
;; 3
;; guix shell --pure -m guix/run-x11.scm -- ./build/release/bin/<game> 4
;;src/c/dl-search.cmodified
@@ -209,8 +209,8 @@ void *dlopen(const char *name, int flags)
209
* whatever order the linker meets the archive members in. */ 210
const char *sigil_desktop_dlopen_search_summary(void) 211
{−212
return "SIGIL_LIBRARY_PATH; $GUIX_ENVIRONMENT/lib; $buildInputs/*/lib and "−213
"$nativeBuildInputs/*/lib under IN_NIX_SHELL; $NIX_LD_LIBRARY_PATH; ~/.guix-home/profile/lib; "+212
return "SIGIL_LIBRARY_PATH; $GUIX_ENVIRONMENT/lib; each $buildInputs and "+213
"$nativeBuildInputs root + /lib under IN_NIX_SHELL; $NIX_LD_LIBRARY_PATH; ~/.guix-home/profile/lib; " 214
"~/.guix-profile/lib; ~/.nix-profile/lib; /etc/profiles/per-user/$USER/lib; " 215
"/run/current-system/profile/lib; /run/current-system/sw/lib"; 216
}test/dl-search-test.shmodified
@@ -10,7 +10,8 @@
10
# and empty (both distributions' rows are live at once) 11
# 3. with a copy in the Guix profile too, the Guix row wins (first hit) 12
# and the trace names it−13
# 4. IN_NIX_SHELL + buildInputs resolves ahead of every profile+13
# 4. IN_NIX_SHELL + buildInputs resolves ahead of every profile, and the+14
# same buildInputs without IN_NIX_SHELL resolves nothing 15
# 5. SIGIL_LIBRARY_PATH resolves ahead of everything 16
# Any assertion failing exits 1. Needs a C compiler: $CC, or the pinned 17
# zig under ~/.sigil/toolchain/zig, or cc.@@ -47,6 +48,11 @@ run first-hit-wins "found via HOME/.guix-home/profile/lib as $H/.guix-home/profi
48
# 4. nix-shell inputs beat the profiles 49
cp "$T/$FAKE" "$T/nixstore/foo-1.0/lib/" 50
run nix-shell "found via buildInputs/lib as $T/nixstore/foo-1.0/lib/$FAKE" IN_NIX_SHELL=impure buildInputs="$T/nixstore/bar-2.0 $T/nixstore/foo-1.0"+51
# 4b. the nix-shell rows apply only under IN_NIX_SHELL: same buildInputs, no+52
# IN_NIX_SHELL, no copies in the profiles -> unresolved+53
rm -f "$H/.guix-home/profile/lib/$FAKE" "$H/.nix-profile/lib/$FAKE"+54
run nix-shell-gated "UNRESOLVED $FAKE" buildInputs="$T/nixstore/foo-1.0"+55
cp "$T/$FAKE" "$H/.nix-profile/lib/" 56
# 5. the override beats everything 57
mkdir -p "$T/override"; cp "$T/$FAKE" "$T/override/" 58
run override "found via SIGIL_LIBRARY_PATH as $T/override/$FAKE" SIGIL_LIBRARY_PATH="/nonexistent:$T/override" IN_NIX_SHELL=impure buildInputs="$T/nixstore/foo-1.0"