NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.11k stars 14.15k forks source link

steam: pressure-vessel does not detect pre-generated locales #354887

Closed Atemu closed 2 days ago

Atemu commented 3 days ago

Issue description

Saw this in the Steam startup log today:

setlocale "de_DE.UTF-8": No such file or directory
pressure-vessel-locale-gen: Missing locale de_DE.UTF-8 (found in $LC_ADDRESS)
pressure-vessel-locale-gen: Generating locale de_DE.UTF-8...
pressure-vessel-locale-gen: Generated locale de_DE.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_GB.UTF-8...
pressure-vessel-locale-gen: Generated locale en_GB.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_IE.UTF-8...
pressure-vessel-locale-gen: Generated locale en_IE.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_DK.UTF-8...
pressure-vessel-locale-gen: Generated locale en_DK.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_US.UTF-8...
pressure-vessel-locale-gen: Generated locale en_US.UTF-8 successfully
pressure-vessel-adverb[3034680]: W: Container startup will be faster if missing locales are created at OS level

We are creating the locales but Steam/pressure-vessel apparently can't find them.

Technical details

cc @K900 @mkg20001

Atemu commented 2 days ago

As it turns out, we're explicitly setting

https://github.com/NixOS/nixpkgs/blob/e20360e289dacab745c92318e0a7bef0c50e05c3/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix#L90

Which in the container is just the default one which obviously doesn't have the locales of my system.

@abbradar introduced this all the way back in 3e395b71da1f99eb5ace8d99adb4b1f76424c3d6.