guix-devel
[Top][All Lists]
Advanced

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

Re: Looking for help with packaging a Common Lisp library


From: Guillaume Le Vaillant
Subject: Re: Looking for help with packaging a Common Lisp library
Date: Sat, 25 Jan 2020 19:28:46 +0100
User-agent: mu4e 1.2.0; emacs 26.3

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 <address@hidden>
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: signature.asc
Description: PGP signature


reply via email to

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