|
From: | Peter Polidoro |
Subject: | Re: Using Makefile to run guix shell? |
Date: | Fri, 09 Dec 2022 12:46:21 -0500 |
User-agent: | mu4e 1.8.11; emacs 28.2 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |