anchor.diff:        --replace no-vcs-found ${version}
     '';
   
  -  cmakeFlags =
  -    optionals (oceSupport) [ "-DKICAD_USE_OCE=ON" "-DOCE_DIR=${opencascade}" ]
  -    ++ optional (ngspiceSupport) "-DKICAD_SPICE=ON"
  -    ++ optionals (scriptingSupport) [
  -      "-DKICAD_SCRIPTING=ON"
  -      "-DKICAD_SCRIPTING_MODULES=ON"
  -      "-DKICAD_SCRIPTING_WXPYTHON=ON"
  -      # nix installs wxPython headers in wxPython package, not in wxwidget
  -      # as assumed. We explicitely set the header location.
  -      "-DCMAKE_CXX_FLAGS=-I${pythonPackages.wxPython}/include/wx-3.0"
  -    ];
  +  cmakeFlags = [
  +    "-DKICAD_SCRIPTING=ON"
  +    "-DKICAD_SCRIPTING_MODULES=ON"
  +    "-DKICAD_SCRIPTING_WXPYTHON=ON"
  +    # nix installs wxPython headers in wxPython package, not in wxwidget
  +    # as assumed. We explicitely set the header location.
  +    "-DCMAKE_CXX_FLAGS=-I${pythonPackages.wxPython}/include/wx-3.0"
  +  ] ++ optionals (oceSupport) [ "-DKICAD_USE_OCE=ON" "-DOCE_DIR=${opencascade}" ]
  +    ++ optional (ngspiceSupport) "-DKICAD_SPICE=ON";
   
     nativeBuildInputs = [
       # https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg29840.html
  
positive.code:   buildInputs = [
      libGLU_combined zlib libX11 wxGTK pcre libXdmcp gettext glew glm libpthreadstubs
      cairo curl openssl boost
    ] ++ optional (oceSupport) opencascade
      ++ optional (ngspiceSupport) libngspice
      ++ optionals (scriptingSupport) [ swig python ];
  
    # this breaks other applications in kicad
    dontWrapGApps = true;
  
negative.code: , wrapGAppsHook
  , oceSupport ? true, opencascade
  , ngspiceSupport ? true, libngspice
  , swig, python, pythonPackages
  }:
  
  assert ngspiceSupport -> libngspice != null;
  