From 1f401a0e353f88595f06265c09cac2f1983cdacb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Nov 2012 22:54:43 +0100 Subject: [PATCH] Make install-grub.pl work when $PATH is empty --- modules/system/boot/loader/grub/grub.nix | 1 + modules/system/boot/loader/grub/install-grub.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/system/boot/loader/grub/grub.nix b/modules/system/boot/loader/grub/grub.nix index 0a9b374cc60..384865b867b 100644 --- a/modules/system/boot/loader/grub/grub.nix +++ b/modules/system/boot/loader/grub/grub.nix @@ -18,6 +18,7 @@ let version extraConfig extraPerEntryConfig extraEntries extraEntriesBeforeNixOS configurationLimit copyKernels timeout default devices; + path = makeSearchPath "bin" [ pkgs.coreutils pkgs.gnused pkgs.findutils pkgs.gnugrep ]; }); in diff --git a/modules/system/boot/loader/grub/install-grub.pl b/modules/system/boot/loader/grub/install-grub.pl index 5e9f3b4efda..1d1958a8fe6 100644 --- a/modules/system/boot/loader/grub/install-grub.pl +++ b/modules/system/boot/loader/grub/install-grub.pl @@ -38,6 +38,7 @@ my $configurationLimit = int(get("configurationLimit")); my $copyKernels = get("copyKernels") eq "true"; my $timeout = int(get("timeout")); my $defaultEntry = int(get("default")); +$ENV{'PATH'} = get("path"); die "unsupported GRUB version\n" if $grubVersion != 1 && $grubVersion != 2;