Overriding a Qt6 package

I recently tried to add an overlay to my NixOS configuration while I wait for the relevant PR to be merged:

final: prev: {
    maestral-gui = prev.maestral-gui.overrideAttrs (oldAttrs: {
      version = "1.9.2";
      src = final.fetchFromGitHub {
        owner = "SamSchott";
        repo = "maestral-qt";
        rev = "refs/tags/v1.9.2";
        hash = "sha256-dgiVSwCTNDncbPJ+f0grjtq822TvtG0PhC9gDOKhwRI=";
      };
    });
}

I was surprised when the system still contained maestral-qt-1.8.0, and I thought the overlay was being ignored somehow, but it turns out the package was indeed at 1.9.2, it’s just the name that was off. In nixpkgs the base package is defined as maestral-gui = qt6.callPackage ../applications/networking/maestral-qt { }; - naively I would expect the name to be correct after overriding the version, but I guess the qt6.callPackage does something different from the normal callPackage?

Is this indeed the expected behaviour / should I be using something other than overrideAttrs in this case?

If I use the overlay you presented, I get a build error:

      > Checking runtime dependencies for maestral_qt-1.9.2-py3-none-any.whl
      >   - maestral>=1.9.2 not satisfied by version 1.8.0

which makes sense, because

So I guess you have to override the python3 argument to maestral-gui with one for which the maestral attribute is also overridden with an updated version.

I’m a bit hazy myself on the details, I remember having recently used pythonPackageExtensions in an overlay to override python3 packages/modules, but when I do this for maestral it doesn’t seem to get picked up…

Thanks, but this way just me trying to keep things simple - but apparently making things more confusing instead.
I also have an override for maestral itself but I didn’t include it in my post since it does what I expected.

    pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
      (
        python-final: python-prev: {
          maestral = python-prev.maestral.overridePythonAttrs (oldAttrs: {
            version = "1.9.2";
            src = final.fetchFromGitHub {
              owner = "SamSchott";
              repo = "maestral";
              rev = "refs/tags/v1.9.2";
              hash = "sha256-Bb0yE2OKdlZd6ZsTEWOD+hMuV41fZanesY49L+v4BBE=";
            };
            propagatedBuildInputs = python-prev.maestral.propagatedBuildInputs ++ [ python-final.xattr ];
            disabledTests = python-prev.maestral.disabledTests ++ [ "test_move_preserves_xattrs" ];
          });
        }
      )
    ];

Ah, ok, I arrived at the same solution as you, but indeed the package is still called maestral-qt-1.8.0 even if it’s actually 1.9.2. So I guess that makes two with a :question: