You're still subject to the restriction that your contributions can't be more than your earned income for the year. Beyond that, money is fungible. There's no real difference between taking a dollar out of your paycheck and putting it in your Roth IRA and taking a dollar out of a gift or inheritance and putting it in your Roth IRA.