A24 has closed a deal for James Ponsoldt’s “The End of the Tour,” starring Jason Segel as David Foster Wallace and Jesse Eisenberg as a Rolling Stone journalist interviewing him.

Based on the David Lipsky memoir, the film premieres Friday night at the Sundance Film Festival.

Lipsky’s memoir is titled “Although Of Course You End Up Becoming Yourself: A Road Trip with David Foster Wallace,” about a five-day interview with the novelist in 1996. The book was written after Wallace’s 2008 suicide.

Ponsoldt says, “I’m thrilled the film will be in the trustworthy and inspired hands of A24,” said Ponsoldt in a statement.

Ponsoldt’s “The Spectacular Now,” also released by A24, won a special jury award at Sundance in 2013 as did his drama “Smashed” the year before. A24 released films including “Obvious Child” and “Under the Skin” in 2014 and has “A Most Violent Year” currently in release.

“The End of the Tour” was produced by Anonymous Content’s David Kanter and Matt DeRoss, Modern Man Films’ James Dahl, and Kilburn Media’s Mark Manuel and Ted O’Neal.

The acquisition was negotiated by UTA Independent Film Group and WME Global. Ponsoldt is also represented by UTA. Fortitude International is handling international sales.