summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRomain GARBAGE <romain.garbage@inria.fr>2026-02-05 11:37:14 +0100
committerAndreas Enge <andreas@enge.fr>2026-03-16 10:16:39 +0100
commitcf5b8dce21799ca3020a4b8e9fffb6a7dc75b985 (patch)
treefb3f4c117d9b6e8fc20f49ef575207c22ae9dbdf /gnu/packages
parent7739b4dd8f514cd1971e12542212813817538ed7 (diff)
gnu: hwloc: Switch to G-expressions.
This commit updates both hwloc packages to use G-exps at the same time as one inherits on the other and doing it in 2 steps would lead to a commit with a broken state. * gnu/packages/mpi.scm (hwloc-1, hwloc-2): Switch to G-expressions. Merges guix/guix!6032 Change-Id: Ie59b12bb1fb9d7d800449afdbf8cfb44c08ec3e9 Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/mpi.scm111
1 files changed, 56 insertions, 55 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index a4bf3985702..a9411f922e0 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -107,42 +107,43 @@
(native-inputs
(list pkg-config))
(arguments
- `(#:configure-flags '("--localstatedir=/var")
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'skip-linux-libnuma-test
- (lambda _
- ;; Arrange to skip 'tests/linux-libnuma', which fails on some
- ;; machines: <https://github.com/open-mpi/hwloc/issues/213>.
- (substitute* "tests/linux-libnuma.c"
- (("numa_available\\(\\)")
- "-1"))))
- (add-after 'install 'refine-libnuma
- ;; Give -L arguments for libraries to avoid propagation
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "lib"))
- (numa (assoc-ref inputs "numactl")))
- (substitute* (map (lambda (f) (string-append out "/" f))
- '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
- (("-lnuma" lib)
- (string-append "-L" numa "/lib " lib))))))
- (add-after 'install 'avoid-circular-references
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((lib (assoc-ref outputs "lib")))
- ;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the
- ;; "lib" output doesn't refer to "out".
- (substitute* (string-append lib "/lib/pkgconfig/hwloc.pc")
- (("^.*prefix=.*$")
- "")))))
- (add-after 'install 'move-man3-pages
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move section 3 man pages to the "doc" output.
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (copy-recursively (string-append out "/share/man/man3")
- (string-append doc "/share/man/man3"))
- (delete-file-recursively
- (string-append out "/share/man/man3"))))))))
+ (list #:configure-flags
+ #~(list "--localstatedir=/var")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'skip-linux-libnuma-test
+ (lambda _
+ ;; Arrange to skip 'tests/linux-libnuma', which fails on some
+ ;; machines: <https://github.com/open-mpi/hwloc/issues/213>.
+ (substitute* "tests/linux-libnuma.c"
+ (("numa_available\\(\\)")
+ "-1"))))
+ (add-after 'install 'refine-libnuma
+ ;; Give -L arguments for libraries to avoid propagation
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "lib"))
+ (numa (assoc-ref inputs "numactl")))
+ (substitute* (map (lambda (f) (string-append out "/" f))
+ '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
+ (("-lnuma" lib)
+ (string-append "-L" numa "/lib " lib))))))
+ (add-after 'install 'avoid-circular-references
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (assoc-ref outputs "lib")))
+ ;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the
+ ;; "lib" output doesn't refer to "out".
+ (substitute* (string-append lib "/lib/pkgconfig/hwloc.pc")
+ (("^.*prefix=.*$")
+ "")))))
+ (add-after 'install 'move-man3-pages
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move section 3 man pages to the "doc" output.
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (copy-recursively (string-append out "/share/man/man3")
+ (string-append doc "/share/man/man3"))
+ (delete-file-recursively
+ (string-append out "/share/man/man3"))))))))
(home-page "https://www.open-mpi.org/projects/hwloc/")
(synopsis "Abstraction of hardware architectures")
(description
@@ -183,25 +184,25 @@ bind processes, and much more.")
(arguments
(substitute-keyword-arguments (package-arguments hwloc-1)
((#:phases phases)
- `(modify-phases ,phases
- (replace 'skip-linux-libnuma-test
- (lambda _
- ;; Arrange to skip 'tests/hwloc/linux-libnuma', which fails on
- ;; some machines: <https://github.com/open-mpi/hwloc/issues/213>.
- (substitute* "tests/hwloc/linux-libnuma.c"
- (("numa_available\\(\\)")
- "-1"))))
- (add-before 'check 'skip-tests-that-require-/sys
- (lambda _
- ;; 'test-gather-topology.sh' requires /sys as of 2.9.0; skip it.
- (setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")))
- (add-before 'check 'skip-test-that-fails-on-qemu
- (lambda _
- ;; Skip test that fails on emulated hardware due to QEMU bug:
- ;; <https://bugs.gnu.org/40342>.
- (substitute* "tests/hwloc/hwloc_get_last_cpu_location.c"
- (("hwloc_topology_init" all)
- (string-append "exit (77);\n" all)))))))))))
+ #~(modify-phases #$phases
+ (replace 'skip-linux-libnuma-test
+ (lambda _
+ ;; Arrange to skip 'tests/hwloc/linux-libnuma', which fails on
+ ;; some machines: <https://github.com/open-mpi/hwloc/issues/213>.
+ (substitute* "tests/hwloc/linux-libnuma.c"
+ (("numa_available\\(\\)")
+ "-1"))))
+ (add-before 'check 'skip-tests-that-require-/sys
+ (lambda _
+ ;; 'test-gather-topology.sh' requires /sys as of 2.9.0; skip it.
+ (setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")))
+ (add-before 'check 'skip-test-that-fails-on-qemu
+ (lambda _
+ ;; Skip test that fails on emulated hardware due to QEMU bug:
+ ;; <https://bugs.gnu.org/40342>.
+ (substitute* "tests/hwloc/hwloc_get_last_cpu_location.c"
+ (("hwloc_topology_init" all)
+ (string-append "exit (77);\n" all)))))))))))
(define-public hwloc
;; The latest stable series of hwloc.