anchor.diff:      export TURBODIR=$out/share/turbomole
       mkdir -p $TURBODIR
       cp -r * $TURBODIR/.
  +
  +    # The symlink/$0 magic of ridft. The script is actually a symlink to rdgrad and figures out
  +    # which fortran executable to call for an actual RIDFT calculation. Now they use
  +    # "PROG=`basename $0`", which gives "ridft", when the script is called by its symlink name,
  +    # but during wrapping it is not.
  +    unlink $TURBODIR/smprun_scripts/ridft
  +    cp $TURBODIR/smprun_scripts/rdgrad $TURBODIR/smprun_scripts/ridft
  +    substituteInPlace $TURBODIR/smprun_scripts/rdgrad \
  +      --replace 'export PROG=`basename $0`' "export PROG=rdgrad"
  +    substituteInPlace $TURBODIR/smprun_scripts/ridft \
  +      --replace 'export PROG=`basename $0`' "export PROG=ridft"
   
       # Find all executables which are entry points.
       exesBin=$(find $TURBODIR/bin/${TURBOMOLE_SYSNAME}_${lib.strings.toLower PARA_ARCH} -type l,f -executable)
  
positive.code:     else "x86_64-unknown-linux-gnu";
  
  in stdenv.mkDerivation rec {
    pname = "turbomole";
    version = "7.5";
  
    nativeBuildInputs = [
      makeWrapper
  
negative.code: { stdenv, lib, makeWrapper, requireFile, autoPatchelfHook, writeTextFile, perl, sysstat, zlib,
    glibc, gcc-unwrapped, which, less, more, coreutils,
    # Configuration
    useMPI ? false
  }:
  let
    systemName = if stdenv.isLinux && stdenv.isx86_64
  