This is a bit trickier than it seems, we can’t just give nailguns the hammering quality because there are a ton of recipes that use that to determine if you can use a tool as a hammer in general, so for shaping metal. Also just giving them the hammering quality won’t let you use the nails loaded in the gun itself.
I think to make this work right we’ll have to separate out hammering and nail driving, and add in some code that will let the tool supply the nails for the crafting task.