It's a common enough pattern in the file that I'm tempted to call it in every other place in this file that needs to install a package. Abstract out "Compilation API" to another parameter. Maybe too far?