[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Makefile to run guix shell?
From: |
zimoun |
Subject: |
Re: Using Makefile to run guix shell? |
Date: |
Sat, 10 Dec 2022 14:21:34 +0100 |
Hi,
On Fri, 09 Dec 2022 at 12:46, Peter Polidoro <peter@polidoro.io> wrote:
> I am not sure if you are the same Simon
Yes, I am. :-) Have we met?
> but it made me wonder if
> using guix extension could a nice way to solve these sorts of
> problems.
Well, I do not know, I mean it is not clear for me what I would like as
an interface.
> Could I have a set of guix extensions local to each project so
> that I can run commands like:
>
> guix serial-shell PORT=/dev/ttyUSB0
>
> Which would really run something like:
>
> guix time-machine -C .channels.scm -- shell --container
> --expose=$(PORT) -- make PORT=$(PORT) serial-shell
>From my understanding, there is 2 levels:
+ how do you call the Guix specific?
+ how do you implement this Guix specific?
Because calling “guix serial-shell PORT=/dev/ttyUSB0” or
“guix-serial-shell PORT=/dev/ttyUSB0” is almost identical. :-)
So the true question is how to implement? If using Shell script
containing something like,
guix time-machine -C .channels.scm -- shell --container
--expose=$(PORT) -- make PORT=$(PORT) serial-shell
Well, the extension is just for fun; it would contain something like:
(invoke "guix" "time-machine" …)
So the extension is replacing the dash by one space. :-)
Now, if instead of the command-line (guix time-machine …), you would
like to use the Scheme API, yeah you can do it using an extension.
>From my point of view, in this case, maybe an extension is a heavy
solution when a quick script would just smooth the workflow.
Somehow, for the difference, give a look at patch#58339 [1],
+ [PATH 1/2] uses “(apply system* …)” instead of “invoke” but that’s
the same idea,
+ [PATH 2/2] uses the Scheme API, sure trivially. :-)
1:
<http://issues.guix.gnu.org/msgid/20221006163609.2280960-1-zimon.toutoune@gmail.com>
HTH.
Cheers,
simon
- Re: Using Makefile to run guix shell?, (continued)
- Re: Using Makefile to run guix shell?, Peter Polidoro, 2022/12/07
- Re: Using Makefile to run guix shell?, Wojtek Kosior, 2022/12/07
- Re: Using Makefile to run guix shell?, zimoun, 2022/12/08
- Re: Using Makefile to run guix shell?, Peter Polidoro, 2022/12/08
- Re: Using Makefile to run guix shell?, Wojtek Kosior, 2022/12/08
- Re: Using Makefile to run guix shell?, zimoun, 2022/12/08
- Re: Using Makefile to run guix shell?, Wojtek Kosior, 2022/12/08
- Re: Using Makefile to run guix shell?, zimoun, 2022/12/08
- Re: Using Makefile to run guix shell?, Wojtek Kosior, 2022/12/08
- Re: Using Makefile to run guix shell?, Peter Polidoro, 2022/12/09
- Re: Using Makefile to run guix shell?,
zimoun <=
- Re: Using Makefile to run guix shell?, Peter Polidoro, 2022/12/12
- Re: Using Makefile to run guix shell?, Wojtek Kosior, 2022/12/12
- Re: Using Makefile to run guix shell?, Philip McGrath, 2022/12/09
Re: Using Makefile to run guix shell?, Wolf, 2022/12/08