anchor.diff:      })
     ];
   
  -  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) ''
  
positive.code: , autoreconfHook
  , pkg-config
  , texinfo
  }:
  
  stdenv.mkDerivation rec {
  
negative.code:       --replace "@PNMTOPS_NOSETPAGE@" "${lib.getBin netpbm}/bin/pnmtops -nosetpage"
    '';
  
    strictDeps = true;
    buildInputs = [ ghostscript psutils netpbm perl bash ];
    nativeBuildInputs = [ autoreconfHook pkg-config texinfo ];
  
    # Builds running without a chroot environment may detect the presence
  