help-guix
[Top][All Lists]
Advanced

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

Re: Common Lisp cli package example


From: Kefir .
Subject: Re: Common Lisp cli package example
Date: Sun, 25 Dec 2022 07:14:32 +0300

Oh, this looks cool, thank you for the explanation :)

> On Dec 24, 2022, at 10:57 PM, Russell Sim <rsl@simopolis.xyz> wrote:
> 
> Hey, 
> 
> "Kefir ." <manualbot@icloud.com> writes:
> 
>> Hi guix! Is there an example of common lisp command line utility
>> packaged using guix?
> 
> I am only new to Guix, the most straight forward I found was to use the
> `build-program' phase.
> 
> I followed StumpWM as an example[1].
> 
> --8<---------------cut here---------------start------------->8---
>      (arguments
>       (list
>        #:phases
>        #~(modify-phases %standard-phases
>            (add-after 'create-asdf-configuration 'build-program
>              (lambda* (#:key outputs #:allow-other-keys)
>                (build-program
>                 (string-append (assoc-ref outputs "out") "/bin/stumpwm")
>                 outputs
>                 #:entry-program '((stumpwm:stumpwm) 0)))))))
> --8<---------------cut here---------------end--------------->8---
> 
> This works to my understanding by inserting a `bulid-program' step after
> the other build phases.  It generates a separate asd file and evaluating
> it with the `program-op' build operation is ASDF.  There is no easy way
> I could see to use an existing `asdf:make' presumably this is because
> redirecting the output file is not possible.
> 
> The `build-program' method is declared in guix/build/lisp-utils.scm[2]
> it also takes a `compress?' keyword argument if you need it, the rest of
> the flags are pretty much automated.
> 
> 1. https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/wm.scm#n1908
> 2. 
> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/lisp-utils.scm#n225
> 
> Cheers,
> Russell



reply via email to

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