aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2020-04-28 10:46:05 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2020-04-28 11:47:46 +0200
commit143eaa82d6d7048705b42597465473bcf309204b (patch)
treed617b2a56b3593fa29ff4cd724f7426fcb720c76 /gnu
parent80d8c00c84191206e3c1edfb7d6a9d47a15ec1bf (diff)
downloadguix-143eaa82d6d7048705b42597465473bcf309204b.tar
guix-143eaa82d6d7048705b42597465473bcf309204b.tar.gz
gnu: sbcl-cl-cffi-gtk: Link source to parent to reduce closure size.
* gnu/packages/lisp-xyz.scm (sbcl-cl-cffi-gtk)[arguments]: Replace source folder with link to the same folder in the sbcl-cl-cffi-gtk-glib dependency.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/lisp-xyz.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 7f78a09ece..5cf8a86940 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -3121,7 +3121,22 @@ is a library for creating graphical user interfaces.")
#:test-asd-file "test/cl-cffi-gtk-test.asd"
;; TODO: Tests fail with memory fault.
;; See https://github.com/Ferada/cl-cffi-gtk/issues/24.
- #:tests? #f))))
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'link-source
+ ;; Since source is particularly heavy (16MiB+), let's reuse it
+ ;; across the different components of cl-ffi-gtk.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((glib-source (string-append (assoc-ref inputs "cl-cffi-gtk-glib")
+ "/share/common-lisp/sbcl-source/"
+ "cl-cffi-gtk-glib"))
+ (out-source (string-append (assoc-ref outputs "out")
+ "/share/common-lisp/sbcl-source/"
+ "cl-cffi-gtk")))
+ (delete-file-recursively out-source)
+ (symlink glib-source out-source)
+ #t))))))))
(define-public cl-cffi-gtk
(sbcl-package->cl-source-package sbcl-cl-cffi-gtk))