summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/httpserver
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2025-02-15 15:47:26 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2025-03-02 22:39:56 +0100
commit1158cd5c13e25d742af6611277efb2825d5586ad (patch)
treedc0ceafca68b96580de1469b1eea938081f1f787 /pkgs/development/python-modules/httpserver
parente41e61c973cc6dc14b4b57cb5b5ca0073a0444e3 (diff)
glibc: install C.utf8 into locale dir instead of archive
Addresses further comments in #347965 On a Ubuntu machine with only C.utf-8 installed, you'd still get perl: warning: Setting locale failed since C.utf-8 is installed into `/usr/lib/locale` directly rather than the archive. `glibc` will first try to find a locate in the archive[1] and then fall back to `lib/locale`[2]. This means that Ubuntu applications still find C.utf-8 since its glibc finds it in `/usr/lib/locale`. However, Nix built applications don't since they fall back to the system-wide archive in `/usr/lib/locale/locale-archive`. This patch changes our glibc to do the same what Ubuntu does: C.utf-8 is installed into `$out/lib/locale`. If the systemd-wide locale archive doesn't have C.utf-8, glibc now falls back to looking in `$out/lib/locale`. I confirmed on an Ubuntu 24.04 VM with empty locale archive that a `cowsay` built on this branch falls back to `$out/lib/locale`: /* exists, but empty */ openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 [...] /* fallback */ openat(AT_FDCWD, "/nix/store/vckzn6k0648yas09c58aq05bav82l46x-glibc-2.40-66/lib/locale/C.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = 3 I checked that this doesn't have obvious regressions on NixOS by building the synapse test on this branch since synapse explicitly depends on C.utf8 in PostgreSQL. [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=locale/findlocale.c;h=e5e2bd3974fe4fd31ae3567d411f1f84dccf8573;hb=HEAD#l152 [2] https://sourceware.org/git/?p=glibc.git;a=blob;f=locale/findlocale.c;h=e5e2bd3974fe4fd31ae3567d411f1f84dccf8573;hb=HEAD#l167
Diffstat (limited to 'pkgs/development/python-modules/httpserver')
0 files changed, 0 insertions, 0 deletions