[PATCH] release/combined: fix for __structuredAttrs

Alyssa Ross
2024-11-30T20:16:04Z

When I set __structuredAttrs for this derivation, these variables were
no longer passed to the build, resulting in GRUB not getting installed
properly.

Fixes: 296ccff ("Build images with __structuredAttrs")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
release/combined/default.nix | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/release/combined/default.nix b/release/combined/default.nix
index 764e2c3..537c5ef 100644
--- a/release/combined/default.nix
+++ b/release/combined/default.nix
@@ -60,15 +60,22 @@ let

esp = runCommand "esp.img" {
nativeBuildInputs = [ grub libfaketime dosfstools mtools ];
- grubTargetDir = "${grub}/lib/grub/${grub.grubTarget}";
- # Definition copied from util/grub-install-common.c.
- # Last checked: GRUB 2.06
- pkglib_DATA = [
- "efiemu32.o" "efiemu64.o" "moddep.lst" "command.lst" "fs.lst" "partmap.lst"
- "parttool.lst" "video.lst" "crypto.lst" "terminal.lst" "modinfo.sh"
- ];
+
+ env = {
+ grubTargetDir = "${grub}/lib/grub/${grub.grubTarget}";
+ # Definition copied from util/grub-install-common.c.
+ # Last checked: GRUB 2.06
+ pkglib_DATA = lib.escapeShellArgs [
+ "efiemu32.o" "efiemu64.o" "moddep.lst" "command.lst" "fs.lst"
+ "partmap.lst" "parttool.lst" "video.lst" "crypto.lst" "terminal.lst"
+ "modinfo.sh"
+ ];
+ };
+
__structuredAttrs = true;
+
unsafeDiscardReferences = { out = true; };
+
passthru = { inherit grubCfg; };
} ''
truncate -s 15M $out

base-commit: 741ed49303ffaba63c409962326ab447639e6e20
--
2.47.0