nongnu: multiarch-container: Fix missing module on foreign distros.

Fixes #277.

See discussion in above issue for details and some education on what went
wrong here.  In short, we didn't capture the needed (guix build utils) module
in the container script.  On a Guix System this didn't cause any problems as
guix modules are found through set Guile environment variables.  But on a
foreign distro these weren't set without hacky workarounds.  This prevented
Steam from launching with a "no code for module" error.

* nonguix/multiarch-container.scm (make-container-wrapper)[make-container-wrapper]:
Use 'with-imported-modules' for (guix build utils).
This commit is contained in:
John Kehayias 2024-01-04 20:44:21 -05:00
parent a328f6c91f
commit 7dd68696a2
No known key found for this signature in database
GPG key ID: 499097AE5EA815D9

View file

@ -239,6 +239,7 @@ in a sandboxed FHS environment."
in a sandboxed FHS environment."
(program-file
(ngc-wrapper-name container)
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
(define (preserve-var var)
@ -368,7 +369,7 @@ in a sandboxed FHS environment."
(add-path item #:writable? #t))
share)
"-m" ,manifest-file
,@command))))))
,@command)))))))
(define (make-container-manifest container fhs-internal)
"Return a scheme file-like object to be used as package manifest for FHS