summaryrefslogtreecommitdiff
path: root/nonguix/multiarch-container.scm
diff options
context:
space:
mode:
authorNoah Evans <noahevans256@gmail.com>2025-08-11 07:45:25 -0400
committerHilton Chain <hako@ultrarare.space>2026-03-21 22:10:43 +0800
commitf2c5b6980b53f43a90ff0fa2a08a2265a0b328b6 (patch)
tree2e7fe43e37bb6406e8f6494ac457859fe0a25008 /nonguix/multiarch-container.scm
parentc977b297fcd5895265bcadcd96bf361b3b142237 (diff)
multiarch-container: Try to install locale after symlinking.
* nonguix/multiarch-container.scm (make-container-internal) [inputs]: Add bash-minimal. [arguments] <#:builder>: Wrap fhs-internal-script with GUILE_INSTALL_LOCALE=0. (make-internal-script): Try to install the locale after creating symlinks. Fixes: #407 Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'nonguix/multiarch-container.scm')
-rw-r--r--nonguix/multiarch-container.scm22
1 files changed, 20 insertions, 2 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm
index e6c512a..b637d06 100644
--- a/nonguix/multiarch-container.scm
+++ b/nonguix/multiarch-container.scm
@@ -43,6 +43,7 @@
(define-module (nonguix multiarch-container)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (guix build-system trivial)
#:use-module (guix gexp)
#:use-module (guix records)
@@ -451,7 +452,9 @@ the exact path for the fhs-internal package."
(package-version (ngc-wrap-package container))))
(source #f)
(inputs `(("fhs-internal-script"
- ,(make-internal-script container))))
+ ,(make-internal-script container))
+ ;; For ‘wrap-program’.
+ ("bash-minimal" ,bash-minimal)))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -462,7 +465,13 @@ the exact path for the fhs-internal package."
(internal-target (assoc-ref %build-inputs "fhs-internal-script"))
(internal-dest (string-append bin "/" ,(ngc-internal-name container))))
(mkdir-p bin)
- (symlink internal-target internal-dest)))))
+ (symlink internal-target internal-dest)
+
+ ;; We want to install the locale manually after symlinking it.
+ ;; See <https://gitlab.com/nonguix/nonguix/-/issues/407>
+ (wrap-program internal-dest
+ #:sh (search-input-file %build-inputs "/bin/bash")
+ '("GUILE_INSTALL_LOCALE" = ("0")))))))
(home-page #f)
(synopsis "Script used to set up sandbox")
(description "Script used inside the FHS Guix container to set up the
@@ -613,6 +622,15 @@ application."
;; inside the container. Needed for GStreamer plugins to load in container.
(setenv "GST_PLUGIN_SYSTEM_PATH" "/lib64/gstreamer-1.0:/lib/gstreamer-1.0")
+ ;; Try to install the locale after symlinking it.
+ ;; See <https://gitlab.com/nonguix/nonguix/-/issues/407>
+ (with-exception-handler
+ (lambda ()
+ (format #t "~%~%Failed to install locale. Is glibc-locales available in the container?~%"))
+ (lambda ()
+ (setlocale LC_ALL ""))
+ #:unwind? #t)
+
;; Process FHS-specific command line options.
(let* ((options (getopt-long (or fhs-args '("")) fhs-option-spec))
(asound32-opt (option-ref options 'asound32 #f))