summary refs log tree commit diff
path: root/pkgs/tools/misc/grub
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-02-06 21:49:02 +0100
committerFelix Buehler <account@buehler.rocks>2023-02-13 21:52:34 +0100
commitcdb39a86e0dd7cda3a057f4f4795485a5c9b9be5 (patch)
tree1fef6e55f39dab2289b68b68972ee4c9b89520f7 /pkgs/tools/misc/grub
parent7f610b4d3f6e6f695b1f5521862066c0ece79a5a (diff)
downloadnixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.gz
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.bz2
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.lz
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.xz
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.zst
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.zip
treewide: use optionalString
Diffstat (limited to 'pkgs/tools/misc/grub')
-rw-r--r--pkgs/tools/misc/grub/2.0x.nix4
-rw-r--r--pkgs/tools/misc/grub/trusted.nix5
2 files changed, 2 insertions, 7 deletions
diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix
index ca12c1f2588..16db1cb2ef1 100644
--- a/pkgs/tools/misc/grub/2.0x.nix
+++ b/pkgs/tools/misc/grub/2.0x.nix
@@ -386,9 +386,7 @@ stdenv.mkDerivation rec {
   # save target that grub is compiled for
   grubTarget = if efiSupport
                then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi"
-               else if inPCSystems
-                    then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
-                    else "";
+               else lib.optionalString inPCSystems "${pcSystems.${stdenv.hostPlatform.system}.target}-pc";
 
   doCheck = false;
   enableParallelBuilding = true;
diff --git a/pkgs/tools/misc/grub/trusted.nix b/pkgs/tools/misc/grub/trusted.nix
index 2d07932dab2..e4efceea888 100644
--- a/pkgs/tools/misc/grub/trusted.nix
+++ b/pkgs/tools/misc/grub/trusted.nix
@@ -103,10 +103,7 @@ stdenv.mkDerivation rec {
   ];
 
   # save target that grub is compiled for
-  grubTarget =
-    if inPCSystems
-    then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
-    else "";
+  grubTarget = lib.optionalString inPCSystems "${pcSystems.${stdenv.hostPlatform.system}.target}-pc";
 
   doCheck = false;
   # On -j16 races with early header creation: