The invention provides compounds of formula (I), as described herein, or pharmaceutically acceptable salts thereof, as well as pharmaceutical compositions comprising the compounds, and synthetic methods and intermediates that are useful for preparing the compounds. The compounds of formula (I) are useful as anti-viral agents and/or as anti-cancer agents.