We consider a nonlocal version of the quasi-static Navier-Stokes-Korteweg equations with a non-monotone pressure law. This system governs the low-Reynolds number dynamics of a compressible viscous fluid that may take either a liquid or a vapour state. For a porous domain that is perforated by cavities with diameter proportional to their mutual distance the homogenization limit is analyzed. We extend the results for compressible one-phase flow with polytropic pressure laws and prove that the effective motion is governed by a nonlocal version of the Cahn-Hilliard equation. Crucial for the analysis is the convolution-like structure of the nonlocal capillarity term that allows to equip the system with a generalized convex free energy. Moreover, the capillarity term accounts not only for the energetic interaction within the fluid but also for the interaction with a solid wall boundary.