summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-02-17 21:08:27 +0100
committerGitHub <noreply@github.com>2021-02-17 21:08:27 +0100
commitb62f1a10cea143d6b76ff1b044ddee9436cd153e (patch)
tree52f602bd2cb9ade5530d980f8823ea34aa1eece7 /pkgs/tools
parentd0dd6b13b7abe160741cf5c65754df3b90226fdb (diff)
parentb3792f925a6d5eb44667bf5db25367cb3d79aceb (diff)
downloadnixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.tar
nixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.tar.gz
nixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.tar.bz2
nixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.tar.lz
nixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.tar.xz
nixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.tar.zst
nixpkgs-b62f1a10cea143d6b76ff1b044ddee9436cd153e.zip
Merge pull request #100078 from mdevlamynck/fix-grub-kbdcomp
grub2: fix grub-kbdcomp
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/grub/2.0x.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix
index bc933312afc..b97d086b972 100644
--- a/pkgs/tools/misc/grub/2.0x.nix
+++ b/pkgs/tools/misc/grub/2.0x.nix
@@ -1,10 +1,12 @@
 { lib, stdenv, fetchgit, flex, bison, python3, autoconf, automake, gnulib, libtool
 , gettext, ncurses, libusb-compat-0_1, freetype, qemu, lvm2, unifont, pkg-config
 , fuse # only needed for grub-mount
+, runtimeShell
 , zfs ? null
 , efiSupport ? false
 , zfsSupport ? false
 , xenSupport ? false
+, kbdcompSupport ? false, ckbcomp
 }:
 
 with lib;
@@ -53,6 +55,13 @@ stdenv.mkDerivation rec {
     ./fix-bash-completion.patch
   ];
 
+  postPatch = if kbdcompSupport then ''
+    sed -i util/grub-kbdcomp.in -e 's@\bckbcomp\b@${ckbcomp}/bin/ckbcomp@'
+  '' else ''
+    echo '#! ${runtimeShell}' > util/grub-kbdcomp.in
+    echo 'echo "Compile grub2 with { kbdcompSupport = true; } to enable support for this command."' >> util/grub-kbdcomp.in
+  '';
+
   nativeBuildInputs = [ bison flex python3 pkg-config autoconf automake ];
   buildInputs = [ ncurses libusb-compat-0_1 freetype gettext lvm2 fuse libtool ]
     ++ optional doCheck qemu