From: zimoun <zimon.toutoune@gmail.com>
To: Peter Polidoro <peter@polidoro.io>
Cc: Wojtek Kosior <koszko@koszko.org>, "(" <paren@disroot.org>,
help-guix@gnu.org
Subject: Re: Using Makefile to run guix shell?
Date: Sat, 10 Dec 2022 14:21:34 +0100 [thread overview]
Message-ID: <86fsdnl7hd.fsf@gmail.com> (raw)
In-Reply-To: <875yeke9qo.fsf@polidoro.io>
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
next prev parent reply other threads:[~2022-12-10 13:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 14:47 Using Makefile to run guix shell? Peter Polidoro
2022-12-07 15:12 ` (
2022-12-07 15:26 ` Peter Polidoro
2022-12-07 15:38 ` (
2022-12-07 18:27 ` Peter Polidoro
2022-12-07 21:01 ` Wojtek Kosior via
2022-12-08 10:44 ` zimoun
2022-12-08 14:21 ` Peter Polidoro
2022-12-08 15:30 ` Wojtek Kosior via
2022-12-08 18:47 ` zimoun
2022-12-08 21:30 ` Wojtek Kosior via
2022-12-08 23:04 ` zimoun
2022-12-08 23:24 ` Wojtek Kosior via
2022-12-09 17:46 ` Peter Polidoro
2022-12-10 13:21 ` zimoun [this message]
2022-12-12 17:55 ` Peter Polidoro
2022-12-12 19:00 ` Wojtek Kosior via
2022-12-09 18:38 ` Philip McGrath
2022-12-07 17:08 ` Wolf
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86fsdnl7hd.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=help-guix@gnu.org \
--cc=koszko@koszko.org \
--cc=paren@disroot.org \
--cc=peter@polidoro.io \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).