Hi Olivier,

Olivier Dion <od...@efficios.com> writes:

> On Sat, 28 Dec 2024, Ludovic Courtès <l...@gnu.org> wrote:
>> Hello,
>>
>> Olivier Dion <od...@efficios.com> skribis:
>>
>>> For what it is worth, I have been using my own build system purely in
>>> Guile for a few years now.  I use it in my main project libpatch
>>> (https://git.sr.ht/~old/libpatch/tree).  It is compatible with the
>>> gnu-build-system (configure && make && make check && make install), but
>>> it does not have to if you want to diverge from this flow.
>>
>> [...]
>>
>>> (define-module (project libpatch build libraries)
>>>   #:use-module ((config) #:prefix conf:)
>>>   #:use-module (ice-9 match)
>>>   #:use-module (project build c)
>>>   #:use-module (project utils list)
>>>   #:use-module (srfi srfi-26)
>>>   #:export (libpatch
>>>             libpatch-ftrace))
>>>
>>> (define libpatch-common
>>>   (c-binary
>>>    (inputs
>>>     '("src/lib/libpatch-common/io.c"
>>>       "src/lib/libpatch-common/read.c"
>>>       "src/lib/libpatch-common/sleep.c"
>>>       "src/lib/libpatch-common/write.c"))
>>>    (cppflags
>>>     (list
>>>      (string-append "-I" conf:srcdir "/src/lib/libpatch-common")))
>>>    (library? #t)
>>>    (shared? #f)
>>>    (output "src/lib/libpatch-common.a")))
>>>
>>> (define libpatch
>>>   (c-binary
>>>    (inputs
>>>     (cons
>>>       libpatch-common
>>>      (cond-list
>>>          '("src/lib/libpatch/core/address.c"
>>>            "src/lib/libpatch/core/attr.c"

Pretty cool, thanks for sharing.

[...]

> Thanks!  Like mentioned in other mails, the build system is a collection
> of Guile modules.  It is actually meant to be embedded in the project.
> This is a design decission because I can rely on Guile been installed on
> distributions, but not the build system.  So if the build system is
> contained within the project itself, problem solve!

In my opinion, it seems like it'd be nice to have the ability to do
both: easily embed in source form for the time being it gets picked up
and packaged properly in distributions, but also have it packaged at
least with Guix so that people can 'guix install' it on any GNU/Linux
distro.

-- 
Thanks,
Maxim

Reply via email to