Since the instroduction of the Versatility feat, I've found it hard to justify a pistol build that isn't a dex melee build with guns skill from Versatility. You want high Dex anyway to get a lot of shots off, so it just sort of seems too obvious that rather than try to run two high stats, run one very high and do two things with it. There's an added benefit there in that it can be awfully tough to naturally get an energy pistol in the very early game, so you can just go around stabbing and/or punching things until you get a few nice pistols, and pick up Versatility a few levels into the game.
High Dex, 6 or 7 Agi for stealth and sprint (and Interloper if you really it), 3 Per unless you want some feats with a Per requirement, and as much Int as you can spare, preferably 10 but at least 7.
Max melee, just enough Guns to get your feats, probably go real heavy on stealth (maybe max it).
Probably get Combo and Expose Weakness so your punching is effective; most other feats can go to your pistols and QoL.
Spec points won't actually matter much for the build to work so get whatever you feel like you'd like.