Does the Seeking Spell Metamagic work on a weapon attack caused by a spell?

The Seeking Spell Metamagic from Tasha’s Cauldron of Everything reads:

Seeking Spell
If you make an attack roll for a spell and miss, you can spend 2 sorcery points to reroll the d20, and you must use the new roll.

My question is, what exactly counts as "an attack roll for a spell"? Obviously something like Inflict Wounds does, but does the weapon attack roll generated by a spell like Booming Blade count? What about a weapon attack roll for a weapon buffed by Magic Weapon?