diff --git a/pkgs/by-name/bootpart-uefi-x86_64/EFI/syslinux/syslinux.cfg b/pkgs/by-name/bootpart-uefi-x86_64/EFI/syslinux/syslinux.cfg new file mode 100644 index 000000000..fb50810e7 --- /dev/null +++ b/pkgs/by-name/bootpart-uefi-x86_64/EFI/syslinux/syslinux.cfg @@ -0,0 +1,4 @@ +DEFAULT trampoline +LABEL trampoline + SAY trampoline into generic extlinux.conf + CONFIG ../../syslinux/syslinux.cfg ../../syslinux diff --git a/pkgs/by-name/bootpart-uefi-x86_64/package.nix b/pkgs/by-name/bootpart-uefi-x86_64/package.nix index 628bed251..86fea0bd9 100644 --- a/pkgs/by-name/bootpart-uefi-x86_64/package.nix +++ b/pkgs/by-name/bootpart-uefi-x86_64/package.nix @@ -4,28 +4,22 @@ stdenv.mkDerivation { pname = "bootpart-uefi-x86_64"; version = "1"; - buildInputs = [ syslinux ]; - dontUnpack = true; installPhase = '' # populate the EFI directory with syslinux, and configure it to read that extlinux.conf file managed by nixos - mkdir -p "$out/EFI/syslinux" "$out/EFI/BOOT" "$out/syslinux" - cp -R "${syslinux}/share/syslinux/efi64"/* "$out/EFI/syslinux" - echo "DEFAULT trampoline" > "$out/EFI/syslinux/syslinux.cfg" - echo "LABEL trampoline" >> "$out/EFI/syslinux/syslinux.cfg" - echo " SAY trampoline into generic extlinux.conf" >> "$out/EFI/syslinux/syslinux.cfg" - echo " CONFIG ../../syslinux/syslinux.cfg ../../syslinux" >> "$out/EFI/syslinux/syslinux.cfg" + mkdir -p $out/EFI/syslinux $out/EFI/BOOT $out/syslinux + cp -R ${syslinux}/share/syslinux/efi64/* $out/EFI/syslinux + install -Dm644 ${./EFI/syslinux/syslinux.cfg} $out/EFI/syslinux/syslinux.cfg # we create this "trampoline" layer so that we can setup the UI directive # and enable a menu before loading the real, nixos-managed extlinux.conf - cp "${syslinux}/share/syslinux/efi64/menu.c32" "$out/syslinux/menu.c32" - echo "UI menu.c32" > "$out/syslinux/syslinux.cfg" - echo "INCLUDE ../extlinux/extlinux.conf" >> "$out/syslinux/syslinux.cfg" + cp ${syslinux}/share/syslinux/efi64/menu.c32 $out/syslinux/menu.c32 + install -Dm644 ${./syslinux/syslinux.cfg} $out/syslinux/syslinux.cfg # create the EFI/BOOT/BOOTX64.EFI default entry - cp "$out/EFI/syslinux"/* "$out/EFI/BOOT" - mv "$out/EFI/BOOT/syslinux.efi" "$out/EFI/BOOT/BOOTX64.EFI" + cp $out/EFI/syslinux/* $out/EFI/BOOT + mv $out/EFI/BOOT/syslinux.efi $out/EFI/BOOT/BOOTX64.EFI ''; meta = { diff --git a/pkgs/by-name/bootpart-uefi-x86_64/syslinux/syslinux.cfg b/pkgs/by-name/bootpart-uefi-x86_64/syslinux/syslinux.cfg new file mode 100644 index 000000000..b2564f47c --- /dev/null +++ b/pkgs/by-name/bootpart-uefi-x86_64/syslinux/syslinux.cfg @@ -0,0 +1,2 @@ +UI menu.c32 +INCLUDE ../extlinux/extlinux.conf