Commit eafc041a authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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: default avatarSamuel Dionne-Riel <samuel@dionne-riel.com>
parent ead1dc99
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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) [