help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Makefile to run guix shell?


From: Philip McGrath
Subject: Re: Using Makefile to run guix shell?
Date: Fri, 09 Dec 2022 13:38:04 -0500
User-agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead

On Wed, Dec 7, 2022, at 10:26 AM, Peter Polidoro wrote:
>> And then all you need to do is run ``guix shell'', and it will 
>> automatically
>> pick up that manifest or package file.
>
> That works well for just the "guix shell" command, but what if I 
> want shortcuts to a whole set of commands?
>
> For example, I might want a command to automatically generate 
> project metadata from an org file running "make metadata":
>
> metadata:
>       $(GUIX-CONTAINER) -- sh -c "emacs --batch -Q  -l .init.el --eval 
>       '(process-org \".metadata.org\")'"
>
> This seems to work well, but I just wondered if putting a Makefile 
> into every project root may cause conflicts for some build 
> systems.
>
> Is there something better to use than make for such command 
> shortcuts?

The ability to to this sort of thing is one of the interesting aspects of Nix 
Flakes. See in particular the “apps” output attributes and the `nix run` 
command: https://nixos.wiki/wiki/Flakes



reply via email to

[Prev in Thread] Current Thread [Next in Thread]