According to the Pfizer press release [0] Paxlovid uses Ritonavir [1], which is a known HIV antiviral, originally patented in 1989.
At the start of the covid pandemic, chinese scientists even tried Kaletra, a generic that combines Ritonavir with another HIV antiviral, and found it to not improve outcomes [2], but this might have been due to them not giving the drug early enough in the infection, but only to hospitalized patients, while Pfizer gave it to non-hospitalized patients with a risk of later hospitalization.
[0]: https://investors.pfizer.com/investor-news/press-release-det...