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: 
  let
  
    inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34 pyqt-builder;
  
    sip = if isPy3k then
      pythonPackages.sip
    else
      (pythonPackages.sip_4.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: {
        # If we install sip in another folder, then we need to create a __init__.py as well
        # if we want to be able to import it with Python 2.
        # Python 3 could rely on it being an implicit namespace package, however,
        # PyQt5 we made an explicit namespace package so sip should be as well.
        postInstall = ''
          cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py
          from pkgutil import extend_path
          __path__ = extend_path(__path__, __name__)
          EOF
        '';
      });
  
    pyqt5_sip = buildPythonPackage rec {
      pname = "PyQt5_sip";
  
negative.code:     ++ lib.optional withConnectivity "PyQt5.QtConnectivity"
    ;
  
    meta = with lib; {
      description = "Python bindings for Qt5";
      homepage    = "https://riverbankcomputing.com/";
  