unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: 36504@debbugs.gnu.org
Cc: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Subject: bug#36504: asdf build system: Add support for component-less .asd
Date: Thu, 04 Jul 2019 19:33:23 +0200	[thread overview]
Message-ID: <8736jlu2l8.fsf@ambrevar.xyz> (raw)

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

I've just packaged sbcl-trivia (hooray!), which implied packaging the
component-less trivia.trivial subsystem.

If you look at the package definition, I had to do this in order to
compile successfully:

--8<---------------cut here---------------start------------->8---
(replace 'create-asd-file
           (lambda* (#:key outputs inputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (lib (string-append out "/lib/sbcl"))
                    (level2 (assoc-ref inputs "trivia.level2")))
               (mkdir-p lib)
               (install-file "trivia.trivial.asd" lib)
               ;; XXX: This .asd does not have any component and the build
               ;; system fails to work in this case.  We should update the
               ;; build system to handle component-less .asd.
               ;; TODO: How do we append to file in Guile?  It seems that
               ;; (open-file ... "a") gets a "Permission denied".
               (substitute* (string-append lib "/trivia.trivial.asd")
                 (("\"\\)")
                  (string-append "\")

(progn (asdf/source-registry:ensure-source-registry)
       (setf (gethash
               \"trivia.level2\"
               asdf/source-registry:*source-registry*)
             #p\""
                                 level2
                                 "/share/common-lisp/sbcl-bundle-systems/trivia.level2.asd\"))"))))))
--8<---------------cut here---------------end--------------->8---

Basically our build system fails when the .asd has no component, which
is done sometime in Common Lisp packages where a system is only used as an
indirection of a union of other systems.

I suggest we update `make-asd-file' file in `lisp-utils.scm' to take
that into account.

Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

             reply	other threads:[~2019-07-04 17:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 17:33 Pierre Neidhardt [this message]
2020-11-29 15:10 ` bug#36504: asdf build system: Add support for component-less .asd Guillaume Le Vaillant

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=8736jlu2l8.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=36504@debbugs.gnu.org \
    --cc=cox.katherine.e@gmail.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).