diff options
author | Domen Kožar <domen@dev.si> | 2016-09-01 10:36:38 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-09-01 10:36:38 +0200 |
commit | f5271680c4a5f2657f26f87620f3e320b0f7cda6 (patch) | |
tree | 1a7ea5174d82f7b9b71dcb2dee8e8b3f74fff43f /nixos/modules/system/boot/loader/grub/grub.nix | |
parent | 2a7293fd9dbd30305a0e32e2e98e42fc5329ff40 (diff) | |
download | nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.tar nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.tar.gz nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.tar.bz2 nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.tar.lz nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.tar.xz nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.tar.zst nixlib-f5271680c4a5f2657f26f87620f3e320b0f7cda6.zip |
Fixes #14831 by using full path for binaries used in install-grub.pl
Both btrfs-progs and utillinux are ~5MB, we may discuss in future to handle this better but I see no better way at the moment than increaing purity in the install process.
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/grub.nix')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/grub.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index e86df4e74c9f..61c34cc2f034 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -425,13 +425,20 @@ in { path = "/boot"; inherit (cfg) devices; inherit (efi) efiSysMountPoint; } ]; - system.build.installBootLoader = pkgs.writeScript "install-grub.sh" ('' + system.build.installBootLoader = + let + install-grub-pl = pkgs.substituteAll { + src = ./install-grub.pl; + inherit (pkgs) utillinux; + btrfsprogs = pkgs.btrfs-progs; + }; + in pkgs.writeScript "install-grub.sh" ('' #!${pkgs.stdenv.shell} set -e export PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX ListCompare ])} ${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"} '' + flip concatMapStrings cfg.mirroredBoots (args: '' - ${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig args} $@ + ${pkgs.perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@ '')); system.build.grub = grub; |