Overlay for patching kwin in KDE Plasma5

Hello! I’m trying to patch kwin in KDE plasma5, but so far without luck. From the documentation Overlays - NixOS Wiki - Adding patches, I created this overlay:

kwin-overlay.nix

self: super:
{
  kwin = super.kwin.overrideAttrs (old: {
    patches = (old.patches or []) ++ [
      ./my-patch.patch
    ];
  });
}

configuration.nix

nixpkgs.overlays = [
  (import /etc/nixos/kwin-overlay.nix)
];

But I assume the package namespace (don’t know the exact term for it) for kwin is wrapped so it’s a bit more complicated? I found something similar here GitHub - InternetUnexplorer/kwin-lowlatency-overlay: NixOS overlay and binary cache for @tildearrow's kwin-lowlatency, but it also does some other things that I don’t quite understand yet.