From 1ea060a2b843eb171d371db7e28694fce24f608e Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Fri, 28 Jul 2023 20:46:45 +0200 Subject: [PATCH] systemd: introduce `withBootloader` for sd-boot, sd-stub, sd-addon Instead of relying blindly on `withEfi` which may not always be relevant. --- pkgs/os-specific/linux/systemd/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 633c98dbb16e..d342cbb2a95d 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -88,6 +88,7 @@ , withAnalyze ? true , withApparmor ? true , withAudit ? true +, withBootloader ? true # compiles systemd-boot, assumes EFI is available. , withCompression ? true # adds bzip2, lz4, xz and zstd , withCoredump ? true , withCryptsetup ? true @@ -148,6 +149,7 @@ assert withHomed -> withCryptsetup; assert withHomed -> withPam; assert withUkify -> withEfi; assert withRepart -> withCryptsetup; +assert withBootloader -> withEfi; let wantCurl = withRemote || withImportd; @@ -534,7 +536,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dman=true" "-Defi=${lib.boolToString withEfi}" - "-Dbootloader=${lib.boolToString withEfi}" + "-Dbootloader=${lib.boolToString withBootloader}" "-Dukify=${lib.boolToString withUkify}" ] ++ lib.optionals (withShellCompletions == false) [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bbfc1c4662c7..95cefc28c902 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29001,6 +29001,7 @@ with pkgs; withTpm2Tss = false; withUserDb = false; withUkify = false; + withBootloader = false; }; systemdStage1 = systemdMinimal.override { pname = "systemd-stage-1";