anchor.diff:      sha256 = "sha256-42hmdMwOYSWGiDCmhuqtpCWtvtyD2l+kA/bhHD/Qh5Y=";
     };
   
  -  nativeBuildInputs = [ makeWrapper ];
  +  nativeBuildInputs = [ makeWrapper ] ++ (lib.lists.optional enableX11 copyDesktopItems);
     buildInputs = [ ocaml ncurses ];
   
     patches = [
  
positive.code: {lib, stdenv, fetchFromGitHub, ocamlPackages, fontschumachermisc, xset, makeWrapper, ncurses, gnugrep, fetchpatch
  , enableX11 ? true}:
  
  let inherit (ocamlPackages) ocaml lablgtk; in
  
negative.code: 
    preInstall = "mkdir -p $out/bin";
  
    postInstall = lib.strings.optionalString enableX11 ''
      for i in $(cd $out/bin && ls); do
        wrapProgram $out/bin/$i \
          --run "[ -n \"\$DISPLAY\" ] && (${xset}/bin/xset q | ${gnugrep}/bin/grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\")"
      done
  
      install -D $src/icons/U.svg $out/share/icons/hicolor/scalable/apps/unison.svg
    '';
  
    dontStrip = !ocaml.nativeCompilers;
  
    desktopItems = lib.lists.optional enableX11 (makeDesktopItem {
      name = pname;
      desktopName = "Unison";
      comment = "Bidirectional file synchronizer";
      genericName = "File synchronization tool";
      exec = "unison";
      icon = "unison";
      categories = "Utility;FileTools;GTK;";
      extraDesktopEntries={
        StartupWMClass="Unison";
        StartupNotify="true";
        X-MultipleArgs="false";
      };
    });
  
    meta = {
      homepage = "https://www.cis.upenn.edu/~bcpierce/unison/";
  