[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guix-based build tool

From: Catonano
Subject: Re: Guix-based build tool
Date: Fri, 20 Apr 2018 08:52:01 +0200

2018-04-19 18:49 GMT+02:00 Catonano <address@hidden>:

2018-04-18 23:09 GMT+02:00 Ludovic Courtès <address@hidden>:

Christopher Lemmer Webber <address@hidden> skribis:

> While this is a fun idea, I'd still much rather have a guile-based
> DSL replacement for autotools type things that's standalone (but maybe
> also which can export to shell if need be).

Yeah, not depending on Guix would have pros (it’d be more widely
applicable), and cons (limited world view).

Food for thought!


there' s this file guix/buid/emacs-utils.scm

it contains utilities to let Emacs byte-compile elisp files

So that' s an Emacs build system and it' s embedded in Guix

My initial idea was to do something similar with Guile

But then I tought that it could have been a stand alone package

Today in the morning I could manage to take a look at this issue

I made a script that visits the file system tree of a project and compiles the .scm files

Here' s a short demo

It doesn' t check the availability of dependencies (other guile packages) yet

I was not sure how to achieve that

I saw that Automake generates snippets of bash scripting that try to run guile with an _expression_ loading the required module and if that fails then the module is not available

The same functionality could be reproduced in Guile

I also saw the guildhall files that Ludo mentioned

So the thing is that the interface towards the user should be like those guildhall files

and the interface towards the system should be like the Automake one

But, like Automake, it should only check if a Guile module is reachable on the guile load path

I am experimenting with this line

(system* "guile" "-c" "(use-modules (commonmark)) (exit ((lambda () 0)))")

If it finds the module it returns 0

Otherwise it returns a different number
I copied some bits for a configure script for a Guile project instrumented with the Autotools

I could use an example of usage of "status:Exit-val"

The Guile manual says:

     Return the exit status value, as would be set if a process ended
     normally through a call to ‘exit’ or ‘_exit’, if any, otherwise

this is not enouhg for me to understand

In which scenario is thhis function supposed to be used ? In order to do what ?
An example would be of great help

Anyway: Is this the idiomatic way ?

Or maybe I should use some try catch form wrapping some module loading instruction ?
Without launching a different guile process ?

Thanks for any hint

reply via email to

[Prev in Thread] Current Thread [Next in Thread]