  Let $I$ be a small category with finite dimensional nerve, and $X\colon I\to
Cat$ a diagram of small categories. We show that, under a "Reedy quasi-fibrancy
condition", the homotopy limit of the geometric realization of $X$ is itself
the geometric realization of a category. This categorical model for the
homotopy limit is defined explicitly, as a category of natural transformations
of diagrams. For the poset $\bullet\to\bullet\leftarrow\bullet$ we recover the
model for homotopy pullbacks provided by Quillen's Theorem $B$ (specifically
Barwick and Kan's version of Quillen's Theorem $B_2$). For diagrams of cubical
shape, this theorem gives a criterion to determine when the geometric
realization of a cube of categories is homotopy cartesian.
  We further generalize this result to equivariant diagrams of categories. For
a finite group $G$ acting on $I$ we show that when $X\colon I\to Cat$ has a
$G$-structure, the realization of the category constructed above is weakly
$G$-equivalent to the homotopy limit of the realization of $X$. For
$G$-diagrams of cubical shape, this is an equivariant version of Quillen's
Theorem $B$.
