Polybar package override cause compile error

I’m trying to override polybar package to include dbus-python and pygobject3 packages needed by a plugin (mpris plugin)

my override:

nixpkgs.config = {
    packageOverrides = pkgs: {
      polybar = (pkgs.polybar.override {
        githubSupport = true;
        mpdSupport = true;
        pulseSupport = true;
        i3GapsSupport = true; 
        }).overrideAttrs (oldAttrs: {
          propagatedBuildInputs = with pkgs.python37Packages; [ dbus-python pygobject3 ];
      });
    };
  };

The error at compiling time:

-- Searching for xcbgen with python2
-- Searching for xcbgen with python2.7
-- Searching for xcbgen with python3
-- Searching for xcbgen with python
CMake Error at lib/xpp/CMakeLists.txt:70 (message):
  Missing required python module: xcbgen

Off the top of my head, do you need to keep the old propagated build inputs? e.g. propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ (with pkgs.python37Packages; [ ... ]);

polybar.nix file doesn’t include propagatedBuildInputs … I tried that anyway and it said that this list is empty