summary refs log tree commit diff
path: root/gnu/packages/lisp.scm
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-01-17 16:44:48 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2020-01-17 17:41:46 +0100
commitcd4eb53c33ee60f397b2b8c47e656e5ed857c480 (patch)
treee2a3240cd92fe61bc11b8c394cd830892c77ed2d /gnu/packages/lisp.scm
parent24de1f5a36119b75c465bc5fb60a73dc5c749f3a (diff)
downloadguix-cd4eb53c33ee60f397b2b8c47e656e5ed857c480.tar.gz
gnu: ecl: Use system ASDF instead of bundled one.
* gnu/packages/lisp.scm (ecl)[source]: Remove snippet.
  [native-inputs]: Add cl-asdf.
  [arguments]: Add 'replace-asdf' phase.
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r--gnu/packages/lisp.scm28
1 files changed, 18 insertions, 10 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index bc4fc6c62a..f82288a5ac 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -230,28 +230,36 @@ interface to the Tk widget system.")
              "https://common-lisp.net/project/ecl/static/files/release/"
              name "-" version ".tgz"))
        (sha256
-        (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; Add ecl-bundle-systems to 'default-system-source-registry'.
-        `(begin
-           (substitute* "contrib/asdf/asdf.lisp"
-             ,@(asdf-substitutions name))
-           #t))))
+        (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))))
     (build-system gnu-build-system)
     ;; src/configure uses 'which' to confirm the existence of 'gzip'.
-    (native-inputs `(("which" ,which)))
+    (native-inputs `(("cl-asdf" ,cl-asdf)
+                     ("which" ,which)))
     (inputs `(("gmp" ,gmp)
               ("libatomic-ops" ,libatomic-ops)
               ("libgc" ,libgc)
               ("libffi" ,libffi)))
     (arguments
-     '(#:configure-flags '("--without-rt")
+     `(#:configure-flags '("--without-rt")
        #:tests? #t
        #:parallel-tests? #f
        #:phases
        (modify-phases %standard-phases
          (delete 'check)
+         (add-after 'unpack 'replace-asdf
+           ;; Use system ASDF instead of bundled one.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
+                    (guix-asdf (string-append
+                                cl-asdf
+                                "/share/common-lisp/source/asdf/asdf.lisp"))
+                    (out (string-append (assoc-ref outputs "out")))
+                    (contrib-asdf "contrib/asdf/asdf.lisp"))
+               (copy-file guix-asdf contrib-asdf)
+               ;; Add ecl-bundle-systems to 'default-system-source-registry'.
+               (substitute* contrib-asdf
+                 ,@(asdf-substitutions name)))
+             #t))
          (add-after 'install 'wrap
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((ecl (assoc-ref outputs "out"))