all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Polidoro <peter@polidoro.io>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Wojtek Kosior <koszko@koszko.org>, "(" <paren@disroot.org>,
	help-guix@gnu.org
Subject: Re: Using Makefile to run guix shell?
Date: Fri, 09 Dec 2022 12:46:21 -0500	[thread overview]
Message-ID: <875yeke9qo.fsf@polidoro.io> (raw)
In-Reply-To: <86359pa45q.fsf@gmail.com>


zimoun <zimon.toutoune@gmail.com> writes:

> $ cat Makefile
> stuff:
> 	which make
>
> guixy:
> 	@guix shell -C which make -- $(MAKE) stuff
>
> $ which make
> /usr/bin/make
>
> $ make stuff
> which make
> /usr/bin/make
>
> $ make guixy
> which make
> /gnu/store/dp8bar2xgzwz1yfm9lcafqn3vhs2cjqc-profile/bin/make
>
> Cheers,
> simon

I just watched the excellent 10 Years of Guix talk "Guix REPL—to 
infinity and beyond".

I am not sure if you are the same Simon, but it made me wonder if 
using guix extension could a nice way to solve these sorts of 
problems.

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

Where some Makefile defines serial-shell:

serial-shell
  picocom -b 9600 -f n -y n -d 8 -p 1 -c $(PORT)

Maybe the path of the Makefile would need to be specified in the 
extension somewhere.

That way non-guix users can just run the Makefile and guix users 
only need to use the guix command. Or maybe the extension could 
call a shell script if that is better for non-guix users than 
running a Makefile.


  parent reply	other threads:[~2022-12-09 18:03 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 [this message]
2022-12-10 13:21                     ` zimoun
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

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

  git send-email \
    --in-reply-to=875yeke9qo.fsf@polidoro.io \
    --to=peter@polidoro.io \
    --cc=help-guix@gnu.org \
    --cc=koszko@koszko.org \
    --cc=paren@disroot.org \
    --cc=zimon.toutoune@gmail.com \
    /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.