anchor.diff:    nativeBuildInputs = [ cmake ]
       ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
     buildInputs = [ boost llvmPackages.libclang ]
  -    ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa;
  +    ++ lib.optional stdenv.isDarwin Cocoa;
   
     buildPhase = ''
       export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped}
  
positive.code:     mkdir -p $out/lib/ycmd/third_party
      cp -r third_party/* $out/lib/ycmd/third_party/
  
    '' + lib.optionalString (gocode != null) ''
      TARGET=$out/lib/ycmd/third_party/gocode
      mkdir -p $TARGET
      ln -sf ${gocode}/bin/gocode $TARGET
    '' + lib.optionalString (godef != null) ''
      TARGET=$out/lib/ycmd/third_party/godef
      mkdir -p $TARGET
      ln -sf ${godef}/bin/godef $TARGET
    '' + lib.optionalString (gotools != null) ''
      TARGET=$out/lib/ycmd/third_party/go/src/golang.org/x/tools/cmd/gopls
      mkdir -p $TARGET
      ln -sf ${gotools}/bin/gopls $TARGET
    '' + lib.optionalString (nodePackages != null) ''
      TARGET=$out/lib/ycmd/third_party/tsserver
      ln -sf ${nodePackages.typescript} $TARGET
    '';
  
negative.code: { stdenv, lib, fetchgit, cmake, llvmPackages, boost, python
  , withGocode ? true, gocode
  , withGodef ? true, godef
  , withGotools? true, gotools
  , withTypescript ? true, nodePackages
  , fixDarwinDylibNames, Cocoa
  }:
  
  stdenv.mkDerivation {
    pname = "ycmd";
    version = "unstable-2020-02-22";
    disabled = !python.isPy3k;
  
    # required for third_party directory creation
    src = fetchgit {
      url = "https://github.com/Valloric/ycmd.git";
      rev = "9a6b86e3a156066335b678c328f226229746bae5";
  