How to not trigger rebuild after overrideAttrs?

I use this to override the preFixup phase of searxng to replace the images:

(pkgs.searxng.overrideAttrs (finalAttrs: previousAttrs: {
  preFixup =
    previousAttrs.preFixup or ""
    + ''
      cp ${self}/mods/searxng/searxng.png \
        $out/share/static/themes/simple/img/searxng.png
      cp ${self}/mods/searxng/searxng.svg \
        $out/share/static/themes/simple/img/searxng.svg
    '';
}))

It works great but every time I run sudo nixos-build switch, the package rebuild itself.
I just want to replace 2 images in the final package. I tried using postInstall but it also rebuild itself. How can I not trigger rebuild for that? Thanks!

You can not.

Unless you can change the location of the images by configuration.

Thanks, good to know that.

I think it is not configurable via config files. The maintainer recommend to fork the repo for that because they see this of changing the branding.

But I did not change the searxng related config between nixos-rebuild switch, why did it rebuild itself again?
I also have some packages using overrideAttrs for version and src, they do not rebuild itself every time I run nixos-rebuild switch.