guix-devel
[Top][All Lists]
Advanced

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

Re: On a Guile-based Build-Tool complimenting Guix


From: Ludovic Courtès
Subject: Re: On a Guile-based Build-Tool complimenting Guix
Date: Sat, 28 Dec 2024 18:50:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hello,

Olivier Dion <odion@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"

That looks nice!  Would be interesting to extract it and see how well it
could serve other projects.

Ludo’.



reply via email to

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