Sorry I cannot respond quickly.  I will try Zelphir’s Makefile later,
but what I meant by wrapping is that

$(guix build g-golf-gtk-4-examples)/share/doc/g-golf/examples/gtk-4/hello-world

is a bash wrapper script that contains:

#!/gnu/store/kz4ldfp06k1jznvxkb4v2pwsvwbnjyr4-bash-minimal-5.1.16/bin/bash
export 
GUILE_LOAD_PATH="/gnu/store/axsrkn279pllrnr3vsiam28sv0nld1qc-guile-g-golf-0.8.1/share/guile/site/3.0:/gnu/store/f8x0l42h53ghy8r8bsbr2qqyn7mwsq1a-guile-cairo-next-1.11.2-0.30da459/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
export 
GUILE_LOAD_COMPILED_PATH="/gnu/store/axsrkn279pllrnr3vsiam28sv0nld1qc-guile-g-golf-0.8.1/lib/guile/3.0/site-ccache:/gnu/store/f8x0l42h53ghy8r8bsbr2qqyn7mwsq1a-guile-cairo-next-1.11.2-0.30da459/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
export 
GI_TYPELIB_PATH="/gnu/store/4bvbq9x6nwvl0ly8hl94vj9jgkrnsq9i-gtk-4.16.13/lib/girepository-1.0:/gnu/store/iybgfig139slwqkibrgjvd5b1hc8a5g9-glib-2.82.1/lib/girepository-1.0:/gnu/store/qj58pbhwlx31anzxd1j2zwkrjihdljp3-pango-1.54.0/lib/girepository-1.0:/gnu/store/nlpgm2jl8mljw22q3di28ckn7n6d0ypg-graphene-1.10.8/lib/girepository-1.0:/gnu/store/jh3djd42swhzsv1rly4gv7y4p8jw4d2d-librsvg-2.58.5/lib/girepository-1.0:/gnu/store/dxc20f42qnmym0zjwmma7f986h633c4c-gobject-introspection-1.82.0/lib/girepository-1.0:/gnu/store/1z52bhjc12x7s0596s5i6bfgnzdpzx4p-harfbuzz-8.3.0/lib/girepository-1.0:/gnu/store/ffacv1k8vhqx42ibi907wfgij8mhcbw2-gdk-pixbuf-2.42.12/lib/girepository-1.0${GI_TYPELIB_PATH:+:}$GI_TYPELIB_PATH"
export 
LD_LIBRARY_PATH="/gnu/store/f8x0l42h53ghy8r8bsbr2qqyn7mwsq1a-guile-cairo-next-1.11.2-0.30da459/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
export 
XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}/gnu/store/3cybsynqjfrp82vqylhfbh48gaak0mbf-adwaita-icon-theme-46.2/share"
exec -a "$0" 
"/gnu/store/3wkjjgmk958adbnkbz5z53gwmw2bgvcd-g-golf-gtk-4-examples-0.8.1/share/doc/g-golf/examples/gtk-4/.hello-world-real"
 "$@"


This script was created by the procedure call

(wrap-program installed-binary
  `("GUILE_LOAD_PATH" prefix
    (,(string-append g-golf scm)
     ,(string-append gcairo scm)))
  `("GUILE_LOAD_COMPILED_PATH" prefix
    (,(string-append g-golf go)
     ,(string-append gcairo go)))
  `("GI_TYPELIB_PATH" prefix
    (,(getenv "GI_TYPELIB_PATH")))
  ;; Library path for libraries loaded by binaries.
  `("LD_LIBRARY_PATH" prefix
    (,(string-append gcairo "/lib")))
  `("XDG_DATA_DIRS" suffix
    (,(string-append adwaita-icons "/share"))))

seen in “guix edit g-golf-gtk-4-examples” with wrap-program being from
the module (guix build utils), i.e. (@ (guix build utils) wrap-program).

In particular, running 
$(guix build 
g-golf-gtk-4-examples)/share/doc/g-golf/examples/gtk-4/.hello-world-real
or
$(guix build --source g-golf)/examples/gtk-4/hello-world
directly when in “guix shell g-golf -D g-golf”
results in the same errors as Zelphir got:

florian@florianhp ~/src/guix [env]$ $(guix build 
g-golf-gtk-4-examples)/share/doc/g-golf/examples/gtk-4/.hello-world-real
**
GLib-GObject:ERROR:../glib-2.82.1/gobject/gbinding.c:874:g_binding_class_init: 
assertion failed: (gobject_notify_signal_id != 0)
Bail out! 
GLib-GObject:ERROR:../glib-2.82.1/gobject/gbinding.c:874:g_binding_class_init: 
assertion failed: (gobject_notify_signal_id != 0)
Abgebrochen


The bash wrapper
$(guix build g-golf-gtk-4-examples)/share/doc/g-golf/examples/gtk-4/hello-world
runs fine (even without guix shell).

The development environment
“guix shell g-golf -D g-golf gtk --no-grafts”
can also run
$(guix build 
g-golf-gtk-4-examples)/share/doc/g-golf/examples/gtk-4/.hello-world-real

Omitting --no-grafts can cause errors here.

Regards,
Florian

Reply via email to