anchor.diff:      "--docdir=share/doc/${pname}${version}"
     ] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
       ++ lib.optional withQt5 "--qt-gui"
  +    ++ lib.optionals buildDocs [
  +      "--sphinx-build=${sphinx}/bin/sphinx-build"
  +      "--sphinx-man"
  +      "--sphinx-info"
  +    ]
       # Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
       ++ lib.optionals stdenv.hostPlatform.is32bit [
         "CFLAGS=-D_FILE_OFFSET_BITS=64"
  
positive.code: 
    ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch;
  
    outputs = [ "out" ];
    setOutputFlags = false;
  
    setupHook = ./setup-hook.sh;
  
    depsBuildBuild = [ buildPackages.stdenv.cc ];
  
    nativeBuildInputs = [ setupHook pkg-config ];
  
    buildInputs = []
      ++ lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ]
  
negative.code: , useOpenSSL ? !isBootstrap, openssl
  , useNcurses ? false, ncurses
  , withQt5 ? false, qtbase
  , buildDocs ? (!isBootstrap && (useNcurses || withQt5)), sphinx, texinfo
  }:
  
  stdenv.mkDerivation (rec {
  