diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index 575b89ba318a..166ec1b28036 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -5,6 +5,7 @@ , autoreconfHook , pkg-config , texinfo +, bash }: stdenv.mkDerivation rec { @@ -31,7 +32,11 @@ stdenv.mkDerivation rec { }) ]; - postPatch = lib.optionalString (psutils != null) '' + postPatch = '' + # BASH_PROG gets replaced with a path to the build bash which doesn't get automatically patched by patchShebangs + substituteInPlace contrib/gdiffmk/gdiffmk.sh \ + --replace "@BASH_PROG@" "/bin/sh" + '' + lib.optionalString (psutils != null) '' substituteInPlace src/preproc/html/pre-html.cpp \ --replace "psselect" "${psutils}/bin/psselect" '' + lib.optionalString (netpbm != null) '' @@ -45,7 +50,8 @@ stdenv.mkDerivation rec { --replace "@PNMTOPS_NOSETPAGE@" "${lib.getBin netpbm}/bin/pnmtops -nosetpage" ''; - buildInputs = [ ghostscript psutils netpbm perl ]; + strictDeps = true; + buildInputs = [ ghostscript psutils netpbm perl bash ]; nativeBuildInputs = [ autoreconfHook pkg-config texinfo ]; # Builds running without a chroot environment may detect the presence