mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: singularity: Wrap programs so they find Coreutils.
* gnu/packages/linux.scm (singularity)[arguments]: Add 'set-PATH' phase.
This commit is contained in:
parent
cf2ac04f13
commit
22464cf32a
1 changed files with 13 additions and 1 deletions
|
@ -3494,7 +3494,19 @@ thanks to the use of namespaces.")
|
|||
(("if ! singularity_which mksquashfs") "if 0")
|
||||
(("if ! mksquashfs")
|
||||
(string-append "if ! " (which "mksquashfs"))))
|
||||
#t)))))
|
||||
#t))
|
||||
(add-after 'install 'set-PATH
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
;; Have the 'singularity' and 'run-singularity' self-sufficient.
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(coreutils (assoc-ref inputs "coreutils")))
|
||||
(wrap-program (string-append out "/bin/singularity")
|
||||
`("PATH" ":" = (,(string-append coreutils "/bin"))))
|
||||
(substitute* (string-append out "/bin/run-singularity")
|
||||
(("/usr/bin/env singularity")
|
||||
(string-append (which "env") " "
|
||||
out "/bin/singularity")))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("libarchive" ,libarchive)
|
||||
("python" ,python-wrapper)
|
||||
|
|
Loading…
Reference in a new issue