Commit 251b0c95 authored by Jean-François Roche's avatar Jean-François Roche
Browse files

nixos/systemd-boot: Fix regression in builder script



Avoid running Python scripts in the root of the package, as this
triggers `os.listdir` on the Nix store directory during import. This
operation can be time-consuming on large store directories
(see issue #283795 for more details).

The issue was initially fixed in #284153 but was reverted in #306339.

Co-authored-by: default avatarSönke Hahn <soenkehahn@gmail.com>
parent 5b3e123c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ let
  systemdBootBuilder = pkgs.substituteAll rec {
    name = "systemd-boot";

    dir = "bin";

    src = checkedSource;

    isExecutable = true;
@@ -86,7 +88,7 @@ let

  finalSystemdBootBuilder = pkgs.writeScript "install-systemd-boot.sh" ''
    #!${pkgs.runtimeShell}
    ${systemdBootBuilder} "$@"
    ${systemdBootBuilder}/bin/systemd-boot "$@"
    ${cfg.extraInstallCommands}
  '';
in {