Re: First example of g-golf (hello world) not working

Zelphir Kaltstahl <[email protected]> Wed, 16 Apr 2025 05:11:21 +0000
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
On 14.04.25 22:26, pelzflorian (Florian Pelz) wrote:
> Hello Zelphir.
>
> Zelphir Kaltstahl<[email protected]> writes:
>> I have many questions now.
>>
>> (1) So, if I understand correctly G-Golf applications can only be run
>> with the help of Guix tooling like `wrap-program`? Unless I somehow
>> set all the environment variables, that are in the wrapper script, by
>> myself to run my own code, instead of examples?
> The quick and dirty --no-grafts way should not be complicated.  You
> already did everything, except in your Makefile setup, I presume it is
> enough to add gtk to guix-env/manifest.scm.
>
> By David’s recommendation, as an alternative to pure GTK, imitate the
> G-Golf adw-1 examples instead of gtk-4 examples.  Then you additionally
> add libadwaita.  (David wrote adw, but the Guix package is called
> libadwaita.)  Or perhaps you also need more dependencies like
> guile-cairo-next in the gtk-4 animated-paintable example.
>
>
>> (2) How do other people develop apps with G-Golf? Everyone using Guix
>> and immediately defining packages in the same way as the gtk 4
>> examples?
> If do not go the quick and dirty route, make a proper GNU Autotools
> build system.  guile-hall can set up these GNU Autotools project files
> automatically.  Then write a normal Guix package, but with inputs and a
> phase wrap-binaries like g-golf-adw-1-examples or g-golf-gtk-4-examples,
> but without inheriting or the other phases that just patch file paths
> and Makefiles specific to G-Golf.  Only then you need not use
> --no-grafts.
>
> This is a proper non-Guix-specific build system and a Guix package.  Do
> not use Guix’ computed-file.  But for personal not security-sensitive
> use (e.g. the app does *not* deal with networking or user files), no
> need to do this, your --no-grafts Makefile is fine.
>
>
>> (3) Can I somehow easily run the wrapper script, but then run my own
>> code, instead of the example?
> You can probably alternatively copy the g-golf-gtk-4-examples’ generated
> wrapper script and adapt it, so you do not need --no-grafts, but this
> would be the most complicated way and likely to break.  Best stick with
> your Makefile with gtk in the manifest, or do the guile-hall setup.
>
> Hope it helps.
>
> Regards,
> Florian

Hi!

I hope to re-read and try what you both describe soon!

I think I still got questions, but maybe those will become obsolete/cleared when 
I get to try things.

Thank you both for your input and responses!

Best regards,
Zelphir

-- 
repositories:https://notabug.org/ZelphirKaltstahl,https://codeberg.org/ZelphirKaltstahl