gnu: singularity: Do not override PATH.

* gnu/packages/linux.scm (singularity)[arguments]: Prepend coreutils, but
don't make it impossible to pick up other tools.
This commit is contained in:
Ricardo Wurmus 2023-10-17 13:57:34 +02:00
parent 2fb94a505b
commit 018567adb7
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -5239,9 +5239,11 @@ (define-public singularity
(add-after 'install 'set-PATH
(lambda _
;; Have the 'singularity' and 'run-singularity' self-sufficient.
;; But don't override PATH, so that other tools like zcat and
;; tar can still be found if they are available.
(let ((coreutils #$(this-package-input "coreutils")))
(wrap-program (string-append #$output "/bin/singularity")
`("PATH" ":" = (,(string-append coreutils "/bin"))))
`("PATH" prefix (,(string-append coreutils "/bin"))))
(substitute* (string-append #$output "/bin/run-singularity")
(("/usr/bin/env singularity")
(string-append (which "env") " "