From: Russell Sim <rsl@simopolis.xyz>
To: "Kefir ." <manualbot@icloud.com>, help-guix@gnu.org
Subject: Re: Common Lisp cli package example
Date: Sat, 24 Dec 2022 20:57:01 +0100 [thread overview]
Message-ID: <87cz881soi.fsf@simopolis.xyz> (raw)
In-Reply-To: <DFA352B0-B73D-4105-BE92-19209678E638@icloud.com>
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
next prev parent reply other threads:[~2022-12-24 21:02 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 [this message]
2022-12-25 4:14 ` Kefir .
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=87cz881soi.fsf@simopolis.xyz \
--to=rsl@simopolis.xyz \
--cc=help-guix@gnu.org \
--cc=manualbot@icloud.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.