unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Kefir ." <manualbot@icloud.com>
To: Russell Sim <rsl@simopolis.xyz>
Cc: help-guix@gnu.org
Subject: Re: Common Lisp cli package example
Date: Sun, 25 Dec 2022 07:14:32 +0300	[thread overview]
Message-ID: <BE1CBEC5-C61E-428E-A50F-D9F61540B805@icloud.com> (raw)
In-Reply-To: <87cz881soi.fsf@simopolis.xyz>

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	other threads:[~2022-12-25  4:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22  8:56 Common Lisp cli package example Kefir .
2022-12-24 19:57 ` Russell Sim
2022-12-25  4:14   ` Kefir . [this message]

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=BE1CBEC5-C61E-428E-A50F-D9F61540B805@icloud.com \
    --to=manualbot@icloud.com \
    --cc=help-guix@gnu.org \
    --cc=rsl@simopolis.xyz \
    /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).