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.
This commit is contained in:
Guillaume Le Vaillant 2020-01-17 16:44:48 +01:00
parent 24de1f5a36
commit cd4eb53c33
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -230,28 +230,36 @@ (define-public ecl
"https://common-lisp.net/project/ecl/static/files/release/" "https://common-lisp.net/project/ecl/static/files/release/"
name "-" version ".tgz")) name "-" version ".tgz"))
(sha256 (sha256
(base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn")) (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))))
(build-system gnu-build-system) (build-system gnu-build-system)
;; src/configure uses 'which' to confirm the existence of 'gzip'. ;; 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) (inputs `(("gmp" ,gmp)
("libatomic-ops" ,libatomic-ops) ("libatomic-ops" ,libatomic-ops)
("libgc" ,libgc) ("libgc" ,libgc)
("libffi" ,libffi))) ("libffi" ,libffi)))
(arguments (arguments
'(#:configure-flags '("--without-rt") `(#:configure-flags '("--without-rt")
#:tests? #t #:tests? #t
#:parallel-tests? #f #:parallel-tests? #f
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'check) (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 (add-after 'install 'wrap
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((ecl (assoc-ref outputs "out")) (let* ((ecl (assoc-ref outputs "out"))