We reinterpret the OSV formula for the on-shell action/entropy function of asymptotically flat BPS black holes as a fixed point formula that is formally equivalent to a recent gluing proposal for asymptotically AdS4 black holes. This prompts a conjecture that the complete perturbative answer for the most general gravitational building block of 4d $$ \mathcal{N} $$
N
= 2 supergravity at a single fixed point takes the form of a Nekrasov-like partition function with equivariant parameters related to the higher-derivative expansion of the prepotential. In turn this leads to a simple localization-like proposal for a set of supersymmetric partition functions in (UV completed) 4d $$ \mathcal{N} $$
N
= 2 supergravity theories. The conjecture is shown to be in agreement with a number of available results for different BPS backgrounds with both Minkowski and AdS asymptotics. In particular, it follows that the OSV formula comes from the unrefined limit of the general expression including only the so-called 𝕎 tower of higher derivatives, while the on-shell action of pure (Euclidean) AdS4 with round S3 boundary comes from the NS limit that includes only the 𝕋 tower. Backgrounds preserving less supersymmetry, such as the under-rotating black holes in flat space, the holographic squashed S3, and the static/rotating twisted and non-twisted Kerr-Newman-like black holes in AdS4 lead to a more general refined version of the corresponding gravitational blocks as dictated by the supersymmetric gluing rules.