anchor.diff:    doCheck = false; # fails
   
     meta = with lib; {
  +    homepage = "https://cmake.org/";
  +    description = "Cross-platform, open-source build system generator";
  +    longDescription = ''
  +      CMake is an open-source, cross-platform family of tools designed to build,
  +      test and package software. CMake is used to control the software
  +      compilation process using simple platform and compiler independent
  +      configuration files, and generate native makefiles and workspaces that can
  +      be used in the compiler environment of your choice.
  +    '';
  +    changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/release/${lib.versions.majorMinor version}.html";
  +    license = licenses.bsd3;
  +    maintainers = with maintainers; [ ttuegel lnl7 ];
  +    platforms = platforms.all;
       broken = (withQt5 && stdenv.isDarwin);
  -    homepage = "https://cmake.org/";
  -    changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/release/${lib.versions.majorMinor version}.html";
  -    description = "Cross-Platform Makefile Generator";
  -    longDescription = ''
  -      CMake is an open-source, cross-platform family of tools designed to
  -      build, test and package software. CMake is used to control the software
  -      compilation process using simple platform and compiler independent
  -      configuration files, and generate native makefiles and workspaces that
  -      can be used in the compiler environment of your choice.
  -    '';
  -    platforms = platforms.all;
  -    maintainers = with maintainers; [ ttuegel lnl7 ];
  -    license = licenses.bsd3;
     };
   }
  
positive.code:   # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG.
    ++ lib.optional stdenv.isDarwin ./darwin-always-set-runtime-c-flag.patch;
  
    outputs = [ "out" ]
      ++ lib.optionals buildDocs [ "man" "info" ];
    setOutputFlags = false;
  
    setupHook = ./setup-hook.sh;
  
    depsBuildBuild = [ buildPackages.stdenv.cc ];
  
    nativeBuildInputs = [ setupHook pkg-config ]
      ++ lib.optionals buildDocs [ texinfo ]
      ++ lib.optionals withQt5 [ wrapQtAppsHook ];
  
    buildInputs = lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ]
      ++ lib.optional useOpenSSL openssl
      ++ lib.optional useNcurses ncurses
      ++ lib.optional withQt5 qtbase
      ++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration;
  
    propagatedBuildInputs = lib.optional stdenv.isDarwin ps;
  
  
negative.code: { lib
  , stdenv
  , buildPackages
  , bzip2
  , curlMinimal
  , expat
  , fetchurl
  , libarchive
  , libuv
  , ncurses
  , openssl
  , pkg-config
  , qtbase
  , rhash
  , sphinx
  , texinfo
  , wrapQtAppsHook
  , xz
  , zlib
  , SystemConfiguration
  , ps
  , isBootstrap ? false
  , useNcurses ? false
  , useOpenSSL ? !isBootstrap
  , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
  , withQt5 ? false
  , buildDocs ? (!isBootstrap && (useNcurses || withQt5))
  }:
  
  stdenv.mkDerivation rec {
  