Yes, actually I am trying to create a React-like GUI framework using Guile Scheme, and I chose Guile-GI for the Gtk bindings. I install it using the Guix package manager on Ubuntu. Here is my Guix manifest.scm
for my Guile GI project:
(specifications->manifest
'("guile"
"guile-gi"
"glib"
"gtk+"))
EDIT: I had originally listed “guile-lib
” as a dependency, but it is not required for Guile-GI.
And I install this with the command:
guix package --profile=./.guix-profile --manifest=./manifest.scm --install
This creates a Guix profile directory in the same directory as my source code. I use a script called ./guile.sh
to launch Guile (and I have to configure Emacs Geiser to use this script):
#!/bin/sh
guix shell --pure -p ./.guix-profile -- guile --r7rs --fresh-auto-compile
The documentation for Guile-GI is also installed into the Guix profile in the ./.guix-profile/share/info
directory. To read it in Emacs using Info-mode, navigate to that directory with Dired and find the file guile-gi.info.gz
, then press I
(capital I) to open that document in Info mode.
I have used Guile-GI with both Gtk3 and Gtk4 on Guix OS, but unfortunately Gtk4 started freezing after I recently did a software update, and I have yet to investigate. Currently I can confirm that Gtk3 on Guix OS and Ubuntu works just fine.
I have also been able to get Guile-GI to build on Ubuntu 23.10, but I had to install the dependencies using apt-get
(I can’t remember exactly what they are right now). The packages install into /usr/lib/x86_64-linux-gnu/guile/3.0
, and it works with both Gtk3 and Gtk4.
I have also tried installing Guile G-Golf but their Guix package has a sort of bug in it: G-Golf requires GLib version 2.72.3, but Guix OS (at least most of their desktop environments, like Gnome and Xfce) require Glib version 2.72. So I am forced to install a whole other copy of libgtk
, libgio
, libgobject
, and libglib
just to get G-Golf to work, which means I have to patch the Guix packages for Gtk and anything else that depends on GLib, and then rebuild all of them from source, which of course takes a very long time and a lot of disk space as well. This also makes it impossible to install both Guile G-Golf and Guile-GI into the same profile with the same manifest, so I cannot easily switch between the two in the same project, I must use separate profiles instead, which is cumbersome.
I am thinking of filing a bug report to Guix OS for them to upgrade to libglib
2.73, so I can offer a choice between using Guile G-Golf and Guile-GI.