summary refs log tree commit diff
path: root/pkgs/tools/misc/grub
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-08-13 10:44:04 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-08-13 21:54:17 +0100
commiteafc041a1944229e5e56d81bcd8cb4ee2397a842 (patch)
tree0478772a060fc948f51e824f9010de84ef487d25 /pkgs/tools/misc/grub
parentead1dc991374af0bc68a9cc05bd0df8d7dca40d3 (diff)
downloadnixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.tar
nixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.tar.gz
nixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.tar.bz2
nixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.tar.lz
nixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.tar.xz
nixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.tar.zst
nixpkgs-eafc041a1944229e5e56d81bcd8cb4ee2397a842.zip
grub2: workaround parallel build failure by building .po files sequentially
Without the change `grub2` build occasionally fails as:

    https://hydra.nixos.org/log/h04imslmgy9l33z6xxsaf9v4svqsc3n2-grub-2.12-rc1.drv

    $ msgmerge --update  --lang=de de.po grub.pot
    $ msgmerge --update  --lang=de de.po grub.pot
    ...
    de.po:745: end-of-file within string
    de.po:745: missing 'msgstr' section

Here `msgmerge --update` attempts to update `de.po` from two parallel
`make` calls when translation updates are happening.

The change works around `de.po` stomping bu regenerating translations
sequentially.

Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Diffstat (limited to 'pkgs/tools/misc/grub')
-rw-r--r--pkgs/tools/misc/grub/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/tools/misc/grub/default.nix b/pkgs/tools/misc/grub/default.nix
index 27702a6ba4a..5fc189a4de1 100644
--- a/pkgs/tools/misc/grub/default.nix
+++ b/pkgs/tools/misc/grub/default.nix
@@ -149,6 +149,13 @@ stdenv.mkDerivation rec {
       substituteInPlace ./configure --replace '/usr/share/fonts/unifont' '${unifont}/share/fonts'
     '';
 
+  postConfigure = ''
+    # make sure .po files are up to date to workaround
+    # parallel `msgmerge --update` on autogenerated .po files:
+    #   https://github.com/NixOS/nixpkgs/pull/248747#issuecomment-1676301670
+    make dist
+  '';
+
   configureFlags = [
     "--enable-grub-mount" # dep of os-prober
   ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [