Can I treat ESPP stock sale 'compensation income' as as 'earned income' for use for a Roth IRA contribution even if I have no other earned income? I'm currently retired.

I am retired and have no 'earned income' but a sale of ESPP stock last year generated 'compensation income' which is taxed as 'ordinary income'. Does this income qualify as ROTH IRA contribution source?