anchor.diff:      # procedure fails. This works around that by rewriting /bin/ls
       # to the proper path.
       #
  +    # In addition, it expects some common utilities (which, whereis)
  +    # to be in the path.
  +    #
       # SoftMaker Office restarts itself upon some operations, such
       # changing the theme and unlocking. Unfortunately, we do not
       # have control over its environment then and it will fail
       # with an error.
  -    lsIntercept = ''
  +    extraWrapperArgs = ''
         --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
  -      --set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls"
  +      --set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls" \
  +      --prefix PATH : "${stdenv.lib.makeBinPath [ coreutils gnugrep utillinux which ]}"
       '';
     in ''
       runHook preInstall
  
positive.code:   # For fixing up execution of /bin/ls, which is necessary for
    # product unlocking.
  , coreutils, libredirect
  
  , pname, version, edition, suiteName, src, archive
  
  
negative.code:     # their resource path.
      mkdir -p $out/bin
      makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker \
        ${extraWrapperArgs}
      makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations \
        ${extraWrapperArgs}
      makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker \
        ${extraWrapperArgs}
  
      for size in 16 32 48 64 96 128 256 512 1024; do
        mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
  