Roth IRA rules are covered under IRS Publication 590-B. Let's look at the text for the First home exception:
First home. Even if you are under age 59½, you do not have to pay the 10% additional tax on up to $10,000 of distributions you receive to buy, build, or rebuild a first home. To qualify for treatment as a first-time homebuyer distribution, the distribution must meet all the following requirements.
It must be used to pay qualified acquisition costs (defined next) before the close of the 120th day after the day you received it.
It must be used to pay qualified acquisition costs for the main home of a first-time homebuyer (defined below) who is any of the following.
Yourself.
Your spouse.
Your or your spouse's child.
Your or your spouse's grandchild.
Your or your spouse's parent or other ancestor.
When added to all your prior qualified first-time homebuyer distributions, if any, total qualifying distributions cannot be more than $10,000.
This $10,000 amount is a lifetime limit for each taxpayer's IRA accounts. Therefore, you could take out $10,000 from your IRA, and your wife could take out $10,000 from her IRA, but you cannot take out $20,000 from your IRA, because it would exceed your lifetime limits. The limit is on your account, not on you as a homebuyer. The reason that "spouse" is listed is that you could take out $10,000 from your IRA to help your spouse buy a house, but this would, again, take up the $10,000 lifetime limit.
That having been said, the Roth IRA is unique among retirement vehicles in that you are allowed to take out any amount that you have contributed, penalty-free, for any reason at any time. Therefore, if your total contributions into your Roth IRA has been at least $8,000, then you can count $8,000 as a return of your contributions, and another $10,000 as a qualified distribution under the first-time homebuyer provision to avoid the penalty.