anchor.diff:  # Standard build environment with cmake.
   , lib, stdenv, fetchurl, fetchpatch, cmake
   
  -# Optional system packages, otherwise internal GEANT4 packages are used.
   , clhep ? null # not packaged currently
   , expat
  +, xercesc
   , zlib
  -
  -# For enableGDML.
  -, xercesc
   
   # For enableQT.
   , qtbase
  
positive.code:     "-DGEANT4_USE_PYTHON=${if enablePython then "ON" else "OFF"}"
      "-DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}"
      "-DGEANT4_USE_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}"
      "-DGEANT4_USE_SYSTEM_EXPAT=${if expat != null then "ON" else "OFF"}"
      "-DGEANT4_USE_SYSTEM_ZLIB=${if zlib != null then "ON" else "OFF"}"
      "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"
    ] ++ lib.optionals stdenv.isDarwin [
      "-DXQuartzGL_INCLUDE_DIR=${libGL.dev}/include"
  
negative.code: { enableMultiThreading ? true
  , enableInventor       ? false
  , enableQT             ? false
  , enableXM             ? false
  , enableOpenGLX11      ? true
  