Similar plot in the Three-Body Problem.
In Asimov’s novel there were SIX suns..............
His original short story was written in 1941.
It was later made into a movie.
In 1988, Nightfall, a low-budget movie was produced based upon the story. The movie was shot on location at the Arcosanti Project, using the resident community members as background actors. Another film version, Nightfall, was made in 2000.
Then in 1990, Asimov and Robert Silverberg collaborated on a complete novel based upon the short story, filling in background about the events leading up to the destruction of civilization. There was a semi-religious group that sought to preserve their civilization through various means because their ancestors had left instructions on what was going to happen, but they were never completely successful, and the people were basically thrown into the equivalent of the stone age...............