mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
gnu: hwloc: Add "lib" and "debug" outputs.
* gnu/packages/mpi.scm (hwloc)[outputs]: New field. [arguments]: Add 'avoid-circular-references' phase. (openmpi)[inputs]: Use the "lib" output of HWLOC. * gnu/packages/parallel.scm (slurm)[inputs]: Likewise.
This commit is contained in:
parent
7eb9f31cd9
commit
798b7678a0
2 changed files with 23 additions and 12 deletions
|
@ -51,6 +51,9 @@ (define-public hwloc
|
||||||
(base32
|
(base32
|
||||||
"0acph1mf7588hfx8ds26ncr6nw5fd9x92adm11fwin7f93i10sdb"))))
|
"0acph1mf7588hfx8ds26ncr6nw5fd9x92adm11fwin7f93i10sdb"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
(outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc.
|
||||||
|
"lib" ;small closure
|
||||||
|
"debug"))
|
||||||
(inputs
|
(inputs
|
||||||
`(("libx11" ,libx11)
|
`(("libx11" ,libx11)
|
||||||
("cairo" ,cairo)
|
("cairo" ,cairo)
|
||||||
|
@ -70,16 +73,24 @@ (define-public hwloc
|
||||||
`(#:configure-flags '("--localstatedir=/var")
|
`(#:configure-flags '("--localstatedir=/var")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after
|
(add-after 'install 'refine-libnuma
|
||||||
'install 'refine-libnuma
|
|
||||||
;; Give -L arguments for libraries to avoid propagation
|
;; Give -L arguments for libraries to avoid propagation
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "lib"))
|
||||||
(numa (assoc-ref inputs "numactl")))
|
(numa (assoc-ref inputs "numactl")))
|
||||||
(substitute* (map (lambda (f) (string-append out "/" f))
|
(substitute* (map (lambda (f) (string-append out "/" f))
|
||||||
'("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
|
'("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
|
||||||
(("-lnuma" lib)
|
(("-lnuma" lib)
|
||||||
(string-append "-L" numa "/lib " 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=.*$")
|
||||||
|
""))
|
||||||
|
#t))))))
|
||||||
(home-page "https://www.open-mpi.org/projects/hwloc/")
|
(home-page "https://www.open-mpi.org/projects/hwloc/")
|
||||||
(synopsis "Abstraction of hardware architectures")
|
(synopsis "Abstraction of hardware architectures")
|
||||||
(description
|
(description
|
||||||
|
@ -111,7 +122,7 @@ (define-public openmpi
|
||||||
"0k95ri9f8kzx5vhzrdbzn59rn2324fs4a96w5v8jy20j8dkbp13l"))))
|
"0k95ri9f8kzx5vhzrdbzn59rn2324fs4a96w5v8jy20j8dkbp13l"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs
|
(inputs
|
||||||
`(("hwloc" ,hwloc)
|
`(("hwloc" ,hwloc "lib")
|
||||||
("gfortran" ,gfortran)
|
("gfortran" ,gfortran)
|
||||||
("valgrind" ,valgrind)))
|
("valgrind" ,valgrind)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
|
|
@ -113,7 +113,7 @@ (define-public slurm
|
||||||
;; in particular mysql and gtk+.
|
;; in particular mysql and gtk+.
|
||||||
(inputs `(("expect" ,expect)
|
(inputs `(("expect" ,expect)
|
||||||
("freeipmi" ,freeipmi)
|
("freeipmi" ,freeipmi)
|
||||||
("hwloc" ,hwloc)
|
("hwloc" ,hwloc "lib")
|
||||||
("json-c" ,json-c)
|
("json-c" ,json-c)
|
||||||
("linux-pam" , linux-pam)
|
("linux-pam" , linux-pam)
|
||||||
("munge" ,munge)
|
("munge" ,munge)
|
||||||
|
|
Loading…
Reference in a new issue