me
/
guix
Archived
1
0
Fork 0

gnu: singularity: Wrap programs so they find Coreutils.

* gnu/packages/linux.scm (singularity)[arguments]: Add 'set-PATH' phase.
master
Ludovic Courtès 2020-03-12 15:44:26 +01:00
parent cf2ac04f13
commit 22464cf32a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 13 additions and 1 deletions

View File

@ -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)