anchor.diff:  , openssl
   , pam
   , perl
  +, python3
   , which
   , xkbcomp
   , xkeyboard_config
   , xorg
  +, xterm
  +, zlib
   }:
   
   stdenv.mkDerivation rec {
     pname = "turbovnc";
  -  version = "2.2.7";
  +  version = "3.0";
   
     src = fetchFromGitHub {
       owner = "TurboVNC";
       repo = "turbovnc";
       rev = version;
  -    sha256 = "sha256-mEdatfTBx4nNmMTgv1Z+xefPFEiE2rCrsxyB7Dd03rg=";
  +    sha256 = "sha256-4/pfKb89ld32LvqTXjVpIJUCCDA+D7CLYMNFYytKVIE=";
     };
   
     # TODO:
  
positive.code: , nixosTests
  
  # Dependencies
  , cmake
  , libjpeg_turbo
  , makeWrapper
  , mesa # for built-in 3D software rendering using swrast
  
negative.code:     cmake
      makeWrapper
      openjdk_headless
      python3
    ];
  
    buildInputs = [
      bzip2
      freetype
      libGL # for -DTVNC_SYSTEMX11=1
      libjpeg_turbo
      openssl
      pam
      perl
      zlib
    ] ++ (with xorg; [
      libfontenc # for -DTVNC_SYSTEMX11=1
      libSM
      libX11
      libXdamage # for -DTVNC_SYSTEMX11=1
      libXdmcp # for -DTVNC_SYSTEMX11=1
      libXext
      libXfont2 # for -DTVNC_SYSTEMX11=1
      libxkbfile # for -DTVNC_SYSTEMX11=1
      libXi
      mesa # for -DTVNC_SYSTEMX11=1
      pixman # for -DTVNC_SYSTEMX11=1
      xorgproto
      xtrans # for -DTVNC_SYSTEMX11=1
    ]);
  
    postPatch = ''
      substituteInPlace unix/Xvnc/CMakeLists.txt --replace 'string(REGEX REPLACE "X11" "Xfont2" X11_Xfont2_LIB' 'set(X11_Xfont2_LIB ${xorg.libXfont2}/lib/libXfont2.so)  #'
      substituteInPlace unix/Xvnc/CMakeLists.txt --replace 'string(REGEX REPLACE "X11" "fontenc" X11_Fontenc_LIB' 'set(X11_Fontenc_LIB ${xorg.libfontenc}/lib/libfontenc.so)  #'
      substituteInPlace unix/Xvnc/CMakeLists.txt --replace 'string(REGEX REPLACE "X11" "pixman-1" X11_Pixman_LIB' 'set(X11_Pixman_LIB ${xorg.pixman}/lib/libpixman-1.so)  #'
    '';
  
    cmakeFlags = [
      # For the 3D software rendering built into TurboVNC, pass the path
  