Locales: Difference between revisions

imported>Pmorch
No edit summary
Roland (talk | contribs)
Document Locales with nix profile
Line 9: Line 9:
And if that file from the local system is somehow broken:
And if that file from the local system is somehow broken:


<syntaxhighlight lang=bash>
<syntaxhighlight lang="bash">
# May require a one-time installation with: nix-env -iA nixpkgs.glibcLocales
# May require a one-time installation with:
nix profile install nixpkgs#glibcLocales
# Using nix profile
export LOCALE_ARCHIVE="$(nix profile list --json | jq '.elements[] | select(.attrPath? and (.attrPath | type == "string") and (.attrPath | endswith("glibcLocales"))) | .storePaths[0]')/lib/locale/locale-archive"
 
# Legacy usage with `nix-env`: May require a one-time installation with: nix-env -iA nixpkgs.glibcLocales
export LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive"
export LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive"
</syntaxhighlight>
</syntaxhighlight>