guix-devel
[Top][All Lists]
Advanced

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

Re: Proposal: A new build-system API


From: zimoun
Subject: Re: Proposal: A new build-system API
Date: Mon, 26 Sep 2022 12:49:02 +0200

Hi,

Thanks for your comments.

On lun., 26 sept. 2022 at 10:39, Mája Tomášek <maya.tomasek@disroot.org> wrote:

> (package
>         ...
>         (inputs list-of-inputs)
>         (build-system some-build-system)
>         (arguments (list-of-quoted #:key value))
>         ...
>         )

[...]

> (package
>         ...
>         (inputs list-of-inputs)
>         (build-system
>                 (some-build-system
>                         (phases new-list-of-phases)
>                         (strip-binaries? #f)))
>         ...
>         )

Hum, from the surface, your proposal is to just move the arguments.
Currently, ’arguments’ are related to ’build-system’ – therefore, I do
not the difference between your proposal and the current situation.


However, this…

> (define-build-system some-build-system
>                      (inherit gnu-build-system)
>                      (name 'some)
>                      (description "Some build system")
>                      (phases %standard-phases)
>                      (strip-binaries? #t)
>                      ...
>                      (builder (thunked)
>                               (build-system->builder this-build-system))
> )
>
> The build-system->builder method would generate the build, with
> arguments properly adjusted, records translated into keyword arguments,
> for a standard build system, the alternative,
> would be to provide a (lambda (build-system)
> some-code-that-returns-derivation).
>
> The current system is good, but when you need to write your own build
> system, you needlessly need to write thins like ungexping arguments,
> running gexp->derivation, which is really the system by which the guix
> daemon operates, but which could really be abstracted away from the
> build system developer. The code writing for a complete build system is 
> repetetive
> and complicated.

…is something different.  Yeah, maybe some glue helpers could ease the
creation of new build-system.  Nevertheless, please note that a
build-system somehow needs some plumbing and I am not convinced that
it would be doable to define a new build-system without diving in some
G-exp here or there.

I agree that the composition of existing bricks is not always
straightforward and it could be improved, eventually. :-)


Cheers,
simon



reply via email to

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