Which stage should I insert desktop entry patching?

I have written a sed script to patch the desktop entry used in the final snap, primary modifying the application Name and Icon keys:

s/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g
s|^Icon=.*|Icon=\${SNAP}/meta/gui/icon.png|

The problem that troubles me is which stage’s override scriptlet should I put the patching? I currently insert it in the override-stage scriptlet after executing snapcraftctl stage but I’m not sure it is the proper timing to do this, any reasoning?

I do this in the build step. Alternatively, if the build doesn’t modify the desktop file I do it in the pull step which is analogous to the old prepare scriptlet timing.