anchor.diff:    buildPycharm = { name, version, build, src, license, description }:
       (mkIdeaProduct rec {
         inherit name version build src;
  -      patchSnappy = false;
         product = "PyCharm";
         meta = with stdenv.lib; {
           homepage = "https://www.jetbrains.com/pycharm/";
  
positive.code: 
  let
  
    mkIdeaProduct =
    { name, product, version, build, src, meta, patchSnappy ? true }:
  
    let loName = stdenv.lib.toLower product;
        hiName = stdenv.lib.toUpper product; in
  
    with stdenv; lib.makeOverridable mkDerivation rec {
      inherit name build src meta;
      desktopItem = makeDesktopItem {
        name = loName;
        exec = loName;
        comment = lib.replaceChars ["\n"] [" "] meta.longDescription;
        desktopName = product;
        genericName = meta.description;
        categories = "Application;Development;";
        icon = loName;
      };
  
      buildInputs = [ makeWrapper patchelf p7zip unzip ];
  
      patchPhase = lib.concatStringsSep "\n" [
        ''
          get_file_size() {
            local fname="$1"
            echo $(ls -l $fname | cut -d ' ' -f5)
  
negative.code:           patchelf --set-interpreter "$interpreter" bin/fsnotifier
            munge_size_hack bin/fsnotifier $target_size
          fi
      '';
  
      installPhase = ''
        mkdir -vp $out/{bin,$name,share/pixmaps,libexec/${name}}
        cp -va . $out/$name
        ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${execName}.png
        mv bin/fsnotifier* $out/libexec/${name}/.
  
        jdk=${jdk.home}
  
        makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
          --prefix PATH : "$out/libexec/${name},${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \
          --prefix JDK_HOME : "$jdk" \
          --prefix ${hiName}_JDK : "$jdk"
  
  