nonguix: multiarch-container: Make locale usable by pressure-vessel.

Steam's pressure-vessel startup time can be improved by not having to generate
locales.  So make sure locales are in and used by the pressure-vessel
container by linking the expected location of /usr/lib/locale (presumably so
that pressure-vessel will capture them) and setting $GUIX_LOCPATH.

* nonguix/multiarch-container.scm (make-container-wrapper): Preserve and set
GUIX_LOCPATH.
(make-internal-script): Add symlink for /usr/lib/locale.
This commit is contained in:
John Kehayias 2023-10-22 14:50:40 -04:00
parent f89556c74c
commit c398116f34
No known key found for this signature in database
GPG key ID: 499097AE5EA815D9

View file

@ -260,6 +260,7 @@ in a sandboxed FHS environment."
"^DISPLAY$" "^DISPLAY$"
"^DRI_PRIME$" "^DRI_PRIME$"
"^GDK_SCALE$" ; For UI scaling. "^GDK_SCALE$" ; For UI scaling.
"^GUIX_LOCPATH$" ; For pressure-vessel locales.
;; For startup of added non-Steam games as it ;; For startup of added non-Steam games as it
;; seems they start in an early environment ;; seems they start in an early environment
;; before our additional settings. (Likely ;; before our additional settings. (Likely
@ -336,6 +337,11 @@ in a sandboxed FHS environment."
;; properly. It seems otherwise they don't make it to launching ;; properly. It seems otherwise they don't make it to launching
;; Steam's pressure-vessel container (for Proton games). ;; Steam's pressure-vessel container (for Proton games).
(setenv "LD_LIBRARY_PATH" "/lib64:/lib") (setenv "LD_LIBRARY_PATH" "/lib64:/lib")
;; Set this so Steam's pressure-vessel container does not need to
;; generate locales, improving startup time. This needs to be set to
;; the "usual" path, probably so they are included in the
;; pressure-vessel container.
(setenv "GUIX_LOCPATH" "/usr/lib/locale")
;; By default VDPAU drivers are searched for in libvdpau's store ;; By default VDPAU drivers are searched for in libvdpau's store
;; path, so set this path to where the drivers will actually be ;; path, so set this path to where the drivers will actually be
;; located in the container. ;; located in the container.
@ -474,6 +480,7 @@ application."
'("/run/current-system/profile/etc" '("/run/current-system/profile/etc"
"/run/current-system/profile/share" "/run/current-system/profile/share"
"/sbin" "/sbin"
"/usr/lib"
"/usr/share/vulkan/icd.d")) "/usr/share/vulkan/icd.d"))
(for-each (for-each
new-symlink new-symlink
@ -491,6 +498,9 @@ application."
((,union64 "lib") . "/lib64") ((,union64 "lib") . "/lib64")
((,union64 "lib") . "/run/current-system/profile/lib64") ((,union64 "lib") . "/run/current-system/profile/lib64")
((,union64 "lib/locale") . "/run/current-system/locale") ((,union64 "lib/locale") . "/run/current-system/locale")
;; Despite using GUIX_LOCPATH, stil need locales in their
;; expected location for pressure-vessel to use them.
((,union64 "lib/locale") . "/usr/lib/locale")
((,union64 "sbin/ldconfig") . "/sbin/ldconfig") ((,union64 "sbin/ldconfig") . "/sbin/ldconfig")
((,union64 "share/mime") . "/usr/share/mime") ; Steam tray icon. ((,union64 "share/mime") . "/usr/share/mime") ; Steam tray icon.
((,union64 "share/drirc.d") . "/usr/share/drirc.d") ((,union64 "share/drirc.d") . "/usr/share/drirc.d")