From 8191c8e226fc158e73358d4951b5f09471753a5a Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 27 Nov 2021 06:19:49 +0200 Subject: [PATCH] grub2: fix buildPackage bash shebang --- pkgs/tools/misc/grub/2.0x.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 661d6be2104..ea983d6f043 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, flex, bison, python3, autoreconfHook, gnulib, libtool +{ lib, stdenv, fetchurl, flex, bison, python3, autoreconfHook, gnulib, libtool, bash , gettext, ncurses, libusb-compat-0_1, freetype, qemu, lvm2, unifont, pkg-config , buildPackages , fetchpatch @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison flex python3 pkg-config gettext freetype autoreconfHook ]; - buildInputs = [ ncurses libusb-compat-0_1 freetype lvm2 fuse libtool ] + buildInputs = [ ncurses libusb-compat-0_1 freetype lvm2 fuse libtool bash ] ++ optional doCheck qemu ++ optional zfsSupport zfs; @@ -141,6 +141,9 @@ stdenv.mkDerivation rec { postInstall = '' # Avoid a runtime reference to gcc sed -i $out/lib/grub/*/modinfo.sh -e "/grub_target_cppflags=/ s|'.*'|' '|" + # just adding bash to buildInputs wasn't enough to fix the shebang + substituteInPlace $out/lib/grub/*/modinfo.sh \ + --replace ${buildPackages.bash} "/usr/bin/bash" ''; passthru.tests = {