From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: extract tools from guix scripts
Date: Sat, 10 Mar 2018 00:32:02 +0100 [thread overview]
Message-ID: <87lgf0x1u5.fsf@gnu.org> (raw)
In-Reply-To: <87d10el7c7.fsf@elephly.net> (Ricardo Wurmus's message of "Thu, 08 Mar 2018 20:01:44 +0100")
Hello,
Ricardo Wurmus <rekado@elephly.net> skribis:
> under “guix/scripts” there are a couple of tools that are really useful,
> such as “guix challenge”. While they are great for the command line,
> I’d really like to use them from within Guile.
>
> Using “(guix-challenge)” directly is cumbersome, because I need to
> provide an argument list “args”, which is then parsed internally.
> Instead, I’d like to be able to say
>
> (challenge #:urls (list "a" "b")
> #:packages (list foo bar baz))
>
> and have it produce some report values. Then “guix-challenge” could be
> implemented in terms of “challenge”.
I think ‘compare-contents’ in (guix scripts challenge) is close to what
you want, no? See tests/challenge.scm for example usage.
The short-lived reproducibility.html generator also used it:
http://git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website/www/packages.scm?id=ae2d0209cc44e25a45cab0abcc9d85172fd48dca#n545
> The same might be useful for “guix-build” or “guix-environment”.
I agree with this sentiment!
Then it’s a matter of defining an appropriate API. For instance, all
‘guix-build’ does is UI stuff around (guix store) and (guix packages).
There’s a higher-level ‘build-package’ procedure in (guix scripts).
IMO a good interface can’t just be a Schemey variant of the CLI, because
often the CLI papers over a number of details that a good API should
expose.
Ludo’.
prev parent reply other threads:[~2018-03-09 23:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 19:01 extract tools from guix scripts Ricardo Wurmus
2018-03-08 20:12 ` Gábor Boskovits
2018-03-08 20:15 ` Ricardo Wurmus
2018-03-08 20:26 ` Gábor Boskovits
2018-03-09 23:32 ` Ludovic Courtès [this message]
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=87lgf0x1u5.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=rekado@elephly.net \
/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.