In the modern era, US Presidents are entitled to numerous perks after their departure from office, including a Presidential Library, 24/7 protection by the Secret Service, a generous pension, etc.
What happens to most of these perks is already explained in the question "If a president is impeached and removed from power, do they lose all benefits usually afforded to presidents when they leave office?". But what this question not answers is whether or not they receive a presidential library.
Are there any qualifications for receiving a presidential library? If a president leaves the office voluntarily or is impeached, will he still get one no matter what?