libraries/singularity: wrapping plugin injection in promises