So, we didn't get into specifics, but being an artificer and going into firearms... I figured the easiest way to handle it (since 5e doesn't really have crafting rules) is to put time in in-game for the physical crafting, and spend the listed book price in gold pieces for materials.
We don't need to get into things like figuring out how a shopkeep would make a profit if they effectively sell at cost (250gp in materials to build a pistol that sells for 250gp would never work, but as this (and thr musket that's next on the list) is more of a one-off item, I'm good.
That said... if you have something else in mind, I am all ears.
[ +- ] A simplistic crafting system.
I will submit one possible option: My IRL table has used a rule where, after establishing a bare minimum cost for materials (steel isn't free, after all) and a bare minimum period of time for crafting, the PC who is crafting makes a skill check at regular intervals, and that impacts the actual cost to build.
The DC gets a bit easier each check, but the cost goes up each check. Eventually, if the cost reaches the listed cost, no roll is needed -- the item is just finished and the crafter pays books price.
Using the pistol as a hypothetical example: It's 250gp. We say the crafter rolls at the end of every work day. A tool set(s) is required to even attempt crafting. Proficiency (based on tools) and a stat modifier are added to the roll. A sword might be STR, a gun would probably be INT due to little parts, a bow might be DEX to carve, etc.
So, we'll say Smith's Tools and Tinker's Tools required, add INT mod and proficiency to the roll.
Day 3: DC 25 - 35 GPs (minimum cost for supplies).
Day 4: DC 23 - 60 GPs
Day 5: DC 21 - 90 GPs
Day 6: DC 18 - 140 GPs
Day 7: DC 16 - 190 GPs
Day 8: DC 15 - 240 GPs
Day 9: DC 1 - 250 GPs
It's fairly simple, but offers a benefit for using/specializing in tools. It also explains how crafters can turn some sort of profit without also flooding the market. Maybe you get lucky and finish it on the first check... more likely though, you'll fail the first couple and fall somewhere in the middle in terms of price and time.