The somewhat bent flat spring that is included with many patch box covers will work to both hold the patchbox lid open and to hold it closed if you install it right.
Most of the rifles I've put together don't have a dedicated hard latch or lock on their patchbox lids. They use the little flat spring.
To see if this is going to work, look at the underside of the patchbox lid. If there is a small, bent piece of material (tab) on the lid right under the area where the hinge is, your in business. This tab is part of what makes the spring work. If this little bent piece is soldered to the lid, read on:
To install the spring after the patchbox cavity is cut and the fixed end of the patchbox is inlayed, cut a narrow trench that is slightly wider than the spring, down into the area under the fixed end of the patchbox. This is right where the hinge is and the trench needs to be in line with the tab on the lid. The depth of this trench needs to go almost to the bottom of the patch box cavity.
Place the end of the spring with the screw hole in it against the bottom of the patch box cavity and with the raised portion of the spring in the trench I just described. The free, raised portion should go slightly further than the place where the lid's hinge pin will be.
Install a small screw thru the hole in the spring, screwing the spring to the bottom of the patch box cavity.
When you install the patchbox lid and secure it in place with its screws, that raised end of the spring should be past the little tab so the tab will always be touching the spring when the lid is closed.
If you did this right, when the lid is closed the spring pushing on the tab will keep the lid closed. If you open the lid with your fingernail, when the lid is open about 1/2" or so, the spring's force on the tab will begin to push the lid further open.