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:   # 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; {
  
negative.code:   nativeBuildInputs = [ cmake ]
      ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
    buildInputs = [ boost llvmPackages.libclang ]
      ++ lib.optional stdenv.isDarwin Cocoa;
  
    buildPhase = ''
      export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped}
  