gnu: singularity: Wrap programs so they find Coreutils.
* gnu/packages/linux.scm (singularity)[arguments]: Add 'set-PATH' phase.master
parent
cf2ac04f13
commit
22464cf32a
|
@ -3494,7 +3494,19 @@ thanks to the use of namespaces.")
|
||||||
(("if ! singularity_which mksquashfs") "if 0")
|
(("if ! singularity_which mksquashfs") "if 0")
|
||||||
(("if ! mksquashfs")
|
(("if ! mksquashfs")
|
||||||
(string-append "if ! " (which "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
|
(inputs
|
||||||
`(("libarchive" ,libarchive)
|
`(("libarchive" ,libarchive)
|
||||||
("python" ,python-wrapper)
|
("python" ,python-wrapper)
|
||||||
|
|
Reference in New Issue