* extract tools from guix scripts
@ 2018-03-08 19:01 Ricardo Wurmus
2018-03-08 20:12 ` Gábor Boskovits
2018-03-09 23:32 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2018-03-08 19:01 UTC (permalink / raw)
To: guix-devel
Hi Guix,
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”.
The same might be useful for “guix-build” or “guix-environment”.
What do you think?
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: extract tools from guix scripts
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-09 23:32 ` Ludovic Courtès
1 sibling, 1 reply; 5+ messages in thread
From: Gábor Boskovits @ 2018-03-08 20:12 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]
2018-03-08 20:01 GMT+01:00 Ricardo Wurmus <rekado@elephly.net>:
> Hi Guix,
>
> 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”.
>
> The same might be useful for “guix-build” or “guix-environment”.
>
>
I agree. This would also enable more flexible cli possibilities, and
would be really useful for scripting. Does this idea fit to the
improve command line tools outreachy idea?
> What do you think?
>
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
> https://elephly.net
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1720 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: extract tools from guix scripts
2018-03-08 20:12 ` Gábor Boskovits
@ 2018-03-08 20:15 ` Ricardo Wurmus
2018-03-08 20:26 ` Gábor Boskovits
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2018-03-08 20:15 UTC (permalink / raw)
To: Gábor Boskovits; +Cc: guix-devel
Gábor Boskovits <boskovits@gmail.com> writes:
> 2018-03-08 20:01 GMT+01:00 Ricardo Wurmus <rekado@elephly.net>:
>
>> Hi Guix,
>>
>> 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”.
>>
>> The same might be useful for “guix-build” or “guix-environment”.
>>
>>
> I agree. This would also enable more flexible cli possibilities, and
> would be really useful for scripting. Does this idea fit to the
> improve command line tools outreachy idea?
The outreachy project is about making the *output* of Guix prettier and
less cluttered, so this would not be part of that project.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: extract tools from guix scripts
2018-03-08 20:15 ` Ricardo Wurmus
@ 2018-03-08 20:26 ` Gábor Boskovits
0 siblings, 0 replies; 5+ messages in thread
From: Gábor Boskovits @ 2018-03-08 20:26 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]
2018-03-08 21:15 GMT+01:00 Ricardo Wurmus <rekado@elephly.net>:
>
> Gábor Boskovits <boskovits@gmail.com> writes:
>
> > 2018-03-08 20:01 GMT+01:00 Ricardo Wurmus <rekado@elephly.net>:
> >
> >> Hi Guix,
> >>
> >> 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”.
> >>
> >> The same might be useful for “guix-build” or “guix-environment”.
> >>
> >>
> > I agree. This would also enable more flexible cli possibilities, and
> > would be really useful for scripting. Does this idea fit to the
> > improve command line tools outreachy idea?
>
> The outreachy project is about making the *output* of Guix prettier and
> less cluttered, so this would not be part of that project.
>
>
I see, then I'm willing to help you out with this, if we decide to
implement it.
I would wait for some more opinions thou.
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
> https://elephly.net
>
>
>
[-- Attachment #2: Type: text/html, Size: 2514 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: extract tools from guix scripts
2018-03-08 19:01 extract tools from guix scripts Ricardo Wurmus
2018-03-08 20:12 ` Gábor Boskovits
@ 2018-03-09 23:32 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2018-03-09 23:32 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
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’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-09 23:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.