From 43da9e8fff25822b6a5ba54e242ff94177b77f0f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 29 Jul 2023 14:37:11 +0100 Subject: [PATCH] glibcLocales: disable parallelism to restore deterministic locales The way `nixpkgs` runs parallel `localedef` instances shares `--prefix=/build` flag. As a result `localedef` processes non-deterministically extend the file with new locales (hopefully without data corruption): https://github.com/NixOS/nixpkgs/issues/245360 Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> --- pkgs/development/libraries/glibc/locales.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/locales.nix b/pkgs/development/libraries/glibc/locales.nix index 86d6d1438b2d..d2db9cd71b20 100644 --- a/pkgs/development/libraries/glibc/locales.nix +++ b/pkgs/development/libraries/glibc/locales.nix @@ -60,7 +60,11 @@ echo SUPPORTED-LOCALES='${toString locales}' > ../glibc-2*/localedata/SUPPORTED ''; - enableParallelBuilding = true; + # Current `nixpkgs` way of building locales is not compatible with + # parallel install. `locale-archive` is updated in parallel with + # multiple `localedef` processes and causes non-deterministic result: + # https://github.com/NixOS/nixpkgs/issues/245360 + enableParallelBuilding = false; makeFlags = (previousAttrs.makeFlags or []) ++ [ "localedata/install-locales"