anchor.diff:      mkdir -p $out/lib/ycmd/third_party
       cp -r third_party/* $out/lib/ycmd/third_party/
   
  -  '' + lib.optionalString (gocode != null) ''
  +  '' + lib.optionalString withGocode ''
       TARGET=$out/lib/ycmd/third_party/gocode
       mkdir -p $TARGET
       ln -sf ${gocode}/bin/gocode $TARGET
  -  '' + lib.optionalString (godef != null) ''
  +  '' + lib.optionalString withGodef ''
       TARGET=$out/lib/ycmd/third_party/godef
       mkdir -p $TARGET
       ln -sf ${godef}/bin/godef $TARGET
  -  '' + lib.optionalString (gotools != null) ''
  +  '' + lib.optionalString withGotools ''
       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) ''
  +  '' + lib.optionalString withTypescript ''
       TARGET=$out/lib/ycmd/third_party/tsserver
       ln -sf ${nodePackages.typescript} $TARGET
     '';
  
positive.code: { stdenv, lib, fetchgit, cmake, llvmPackages, boost, python
  , gocode ? null
  , godef ? null
  , gotools ? null
  , nodePackages ? null
  , fixDarwinDylibNames, Cocoa ? null
  }:
  
  stdenv.mkDerivation {
    pname = "ycmd";
    version = "2020-02-22";
    disabled = !python.isPy3k;
  
    src = fetchgit {
      url = "https://github.com/Valloric/ycmd.git";
      rev = "9a6b86e3a156066335b678c328f226229746bae5";
  
negative.code:   # python won't be thrown off by argv[0]
    postFixup = ''
      substituteInPlace $out/lib/ycmd/ycmd/__main__.py \
        --replace $out/lib/ycmd/ycmd/__main__.py $out/bin/ycmd \
        --replace __file__ "'$out/lib/ycmd/ycmd/__main__.py'"
    '';
  
    meta = with lib; {
  