  Let ${\mathcal X}$ be a category fibered in groupoids over a finite field
$\mathbb{F}_q$, and let $k$ be an algebraically closed field containing
$\mathbb{F}_q$. Denote by $\phi_k\colon {\mathcal X}_k\to {\mathcal X}_k$ the
arithmetic Frobenius of ${\mathcal X}_k/k$ and suppose that ${\mathcal M}$ is a
stack over $\mathbb{F}_q$ (not necessarily in groupoids). Then there is a
natural functor $\alpha_{{\mathcal M},{\mathcal X}}\colon{\mathcal M}({\mathcal
X})\to{\mathcal M}({\mathbf D_k}({\mathcal X}))$, where ${\mathcal M}({\mathbf
D_k}({\mathcal X}))$ is the category of $\phi_k$-invariant maps ${\mathcal
X}_k\to {\mathcal M}$. A version of Drinfeld's lemma states that if ${\mathcal
X}$ is a projective scheme and ${\mathcal M}$ is the stack of quasi-coherent
sheaves of finite presentation, then $\alpha_{{\mathcal M},{\mathcal X}}$ is an
equivalence.
  We extend this result in several directions. For proper algebraic stacks or
affine gerbes ${\mathcal X}$, we prove Drinfeld's lemma and deduce that
$\alpha_{{\mathcal M},{\mathcal X}}$ is an equivalence for very general
algebraic stacks ${\mathcal M}$.
  For arbitrary ${\mathcal X}$, we show that $\alpha_{{\mathcal M},{\mathcal
X}}$ is an equivalence when ${\mathcal M}$ is the stack of immersions, the
stack of quasi-compact separated \'etale morphisms or any quasi-separated
Deligne-Mumford stack with separated diagonal.
