all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Guillaume Le Vaillant <glv@posteo.net>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: guix-devel@gnu.org
Subject: Re: Looking for help with packaging a Common Lisp library
Date: Sat, 25 Jan 2020 19:28:46 +0100	[thread overview]
Message-ID: <87lfpv8k69.fsf@yamatai> (raw)
In-Reply-To: <87h80ja4qs.fsf@ambrevar.xyz>

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


We could add all the dependencies declared in the original asd files (by
'defsystem-depends-on' and 'depends-on') to the generated asd files with
the following patch:

--8<---------------cut here---------------start------------->8---
From 7e2009177137b3ad5831b5c42d9a4387d408bc57 Mon Sep 17 00:00:00 2001
From: Guillaume Le Vaillant <glv@posteo.net>
Date: Sat, 25 Jan 2020 18:07:37 +0100
Subject: [PATCH] build: lisp-utils: Take  defsystem dependencies into
 consideration.

* guix/build/lisp-utils.scm (system-dependencies): Add the dependencies
  declared with ':defsystem-depends-on' in asd-file to the list of
  dependencies.
---
 guix/build/lisp-utils.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index c7a589c902..cce8047d61 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -165,10 +165,11 @@ asdf:system-depends-on.  First load the system's ASD-FILE."
       (asdf:load-asd (truename ,asd-file) :name ,(normalize-string system))
       (with-open-file
        (stream ,deps-file :direction :output)
-       (format stream
-               "~s~%"
-               (asdf:system-depends-on
-                (asdf:find-system ,system))))))
+       (let* ((sys (asdf:find-system ,system))
+              (deps (union (asdf:system-defsystem-depends-on sys)
+                           (asdf:system-depends-on sys)
+                           :test (function equal))))
+         (format stream "~s~%" deps)))))
 
   (dynamic-wind
     (lambda _
-- 
2.25.0
--8<---------------cut here---------------end--------------->8---

With this patch, we might need to add some inputs to a few Lisp
packages, but probably not a lot of them.

Do you think this patch would be a good idea, or do you see some cases
where it could break something?

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

  reply	other threads:[~2020-01-25 18:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-25 15:03 Looking for help with packaging a Common Lisp library Konrad Hinsen
2020-01-25 15:51 ` Pierre Neidhardt
2020-01-25 16:13   ` Guillaume Le Vaillant
2020-01-25 16:19     ` Pierre Neidhardt
2020-01-25 18:28       ` Guillaume Le Vaillant [this message]
2020-01-25 19:10         ` Pierre Neidhardt
2020-01-25 19:57     ` Konrad Hinsen
2020-01-25 20:04       ` Pierre Neidhardt
2020-01-26 10:54         ` Konrad Hinsen
2020-01-26 12:15           ` Pierre Neidhardt
2020-01-26 18:04             ` Konrad Hinsen
2020-01-27 14:07               ` Guillaume Le Vaillant
2020-01-27 14:33                 ` Pierre Neidhardt
2020-01-28 10:07                   ` Guillaume Le Vaillant
2020-01-28 11:15                     ` Pierre Neidhardt
2020-01-28 17:09                       ` Konrad Hinsen

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=87lfpv8k69.fsf@yamatai \
    --to=glv@posteo.net \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.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.
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.