anchor.diff:      qtbase
       qtsvg
       qtdeclarative
  +    pyqt-builder
     ]
       ++ lib.optional withConnectivity qtconnectivity
       ++ lib.optional withWebKit qtwebkit
       ++ lib.optional withWebSockets qtwebsockets
  -    ++ lib.optional isPy3k pyqt-builder
     ;
   
     propagatedBuildInputs = [
       dbus-python
  -  ] ++ (if isPy3k then [ pyqt5_sip ] else [ sip enum34 ]);
  +    pyqt5_sip
  +  ];
   
     patches = [
  -    # Fix some wrong assumptions by ./configure.py and ./project.py
  +    # Fix some wrong assumptions by ./project.py
       # TODO: figure out how to send this upstream
       ./pyqt5-fix-dbus-mainloop-support.patch
     ];
  
positive.code:     WebSocketsEnabled = withWebSockets;
    };
  
    # Configure only needed when building with sip 4 (python 2)
    dontConfigure = isPy3k;
  
    configurePhase = ''
      runHook preConfigure
  
      export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
  
      ${python.executable} configure.py  -w \
        --confirm-license \
        --dbus-moduledir=$out/${python.sitePackages}/dbus/mainloop \
        --no-qml-plugin \
        --bindir=$out/bin \
        --destdir=$out/${python.sitePackages} \
        --stubsdir=$out/${python.sitePackages}/PyQt5 \
        --sipdir=$out/share/sip/PyQt5 \
        --designer-plugindir=$out/plugins/designer
  
      runHook postConfigure
    '';
  
    postInstall = lib.optionalString (!isPy3k) ''
      ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/
      for i in $out/bin/*; do
        wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
      done
  
      # Let's make it a namespace package
      cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py
      from pkgutil import extend_path
      __path__ = extend_path(__path__, __name__)
      EOF
    '';
  
    # Checked using pythonImportsCheck
    doCheck = false;
  
negative.code: in buildPythonPackage rec {
    pname = "PyQt5";
    version = "5.15.4";
    format = "pyproject";
  
    disabled = isPy27;
  
    src = pythonPackages.fetchPypi {
      inherit pname version;
  