all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Mája Tomášek" <maya.tomasek@disroot.org>, guix-devel@gnu.org
Subject: Re: Proposal: A new build-system API
Date: Mon, 26 Sep 2022 12:49:02 +0200	[thread overview]
Message-ID: <87h70ucswx.fsf@gmail.com> (raw)
In-Reply-To: <87zgemfs1e.fsf@disroot.org>

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	other threads:[~2022-09-26 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26  8:39 Proposal: A new build-system API Mája Tomášek
2022-09-26 10:49 ` zimoun [this message]
2022-09-26 18:07   ` Mája Tomášek
2022-09-27  7:56     ` Philip McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h70ucswx.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=maya.tomasek@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.