“Star Wars” actor John Boyega is in talks to star in the legal drama “A Naked Singularity” with Ridley Scott’s Scott Free Productions on board to produce.

The movie is based on Sergio De La Pava’s debut novel, which centers on a successful New York public defender whose life begins to unravel after he loses his first case. Attorney De La Pava self-published the book in 2008 and won the PEN/Robert W. Bingham Prize for Debut Fiction after it was re-published in 2012.

Chase Palmer, one of the co-writers of the “It” screenplay, is on board to direct from a script by David Matthews. Scott Free and Tony Ganz are producing, while 3311 Productions is financing.

Boyega starred as the rebel Finn in “Star Wars: The Force Awakens” and “Star Wars: The Last Jedi,” and will be seen in the upcoming “Star Wars: Episode IX.” The British actor’s credits include “Detroit,” “Pacific Rim: Uprising,” and the upcoming Netflix mini-series “Watership Down,” which also stars James McAvoy, Ben Kingsley, and Daniel Kaluuya.

Boyega is repped by WME, Identity Agency Group in the U.K., and Hansen, Jacobson. Palmer is repped by WME, Gotham Group, and Weintraub Tobin. Matthews is repped by WME, Anonymous Content, and Frankfurt Kurnit. The news was first reported by the Hollywood Reporter.