anchor.diff:      "--disable-carbon_check"
       "--disable-gtktest"
     ]
  +    ++ lib.optional (guiSupport == "gtk2" || guiSupport == "gtk3") "--enable-gui=${guiSupport}"
     ++ lib.optional stdenv.isDarwin
        (if darwinSupport then "--enable-darwin" else "--disable-darwin")
     ++ lib.optionals luaSupport [
  
positive.code:   patches = [ ./cflags-prune.diff ] ++ lib.optional ftNixSupport ./ft-nix-support.patch;
  
    configureFlags = [
      "--enable-gui=${guiSupport}"
      "--with-features=${features}"
      "--disable-xsmp"              # XSMP session management
      "--disable-xsmp_interact"     # XSMP interaction
  
negative.code:   ++ lib.optional (guiSupport == "gtk3") wrapGAppsHook
    ;
  
    buildInputs = [
      ncurses
      glib
    ]
      # All X related dependencies
      ++ lib.optionals (guiSupport == "gtk2" || guiSupport == "gtk3") [
        libSM
        libICE
        libX11
        libXext
        libXpm
        libXt
        libXaw
        libXau
        libXmu
      ]
      ++ lib.optional (guiSupport == "gtk2") gtk2-x11
      ++ lib.optional (guiSupport == "gtk3") gtk3-x11
      ++ lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ]
  