aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-11-28 15:20:20 +0900
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-12-18 16:27:09 +0900
commit08e0144d2338c8fb51e52e74274554583d0faa69 (patch)
tree8fe852f68622bcf860894bcb8a508532c743f0bb /gnu
parent65c043edef33bc400f8c5d329c6fe33378c19548 (diff)
downloadguix-08e0144d2338c8fb51e52e74274554583d0faa69.tar.gz
guix-08e0144d2338c8fb51e52e74274554583d0faa69.zip
gnu: openmpi-5: Streamline source and do not install HTML doc.
This reduces the installed package size by 63 MiB. * gnu/packages/mpi.scm (openmpi-5) [source]: Add modules, snippet fields. Change-Id: Ie3dc365a2e4e48dc4c385dd447d3c64b7db065ca
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/mpi.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index ccf6dc4219..661531abb9 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -325,6 +325,31 @@ software vendors, application developers and computer science researchers.")
(uri (string-append "https://www.open-mpi.org/software/ompi/v"
(version-major+minor version)
"/downloads/openmpi-" version ".tar.bz2"))
+ (modules '((guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-26)))
+ (snippet
+ '(begin
+ ;; XXX: 'delete-all-but' is copied from the turbovnc package.
+ (define (delete-all-but directory . preserve)
+ (define (directory? x)
+ (and=> (stat x #f)
+ (compose (cut eq? 'directory <>) stat:type)))
+ (with-directory-excursion directory
+ (let* ((pred
+ (negate (cut member <> (append '("." "..") preserve))))
+ (items (scandir "." pred)))
+ (for-each (lambda (item)
+ (if (directory? item)
+ (delete-file-recursively item)
+ (delete-file item)))
+ items))))
+ ;; Delete as many bundled libraries as permitted by the build
+ ;; system.
+ (delete-all-but "3rd-party" "treematch" "Makefile.in" "Makefile.am")
+ ;; Do not install 64 MiB worth fo pre-generated HTML
+ ;; documentation.
+ (delete-file-recursively "docs/html")))
(sha256
(base32 "0mw1z4ppnlvxngwd58kl5q26qmvf3bgjkd4r8wjpqis3pky86hdx"))))