Problem
If we test a true point Null hypothesis using a continuously distributed test statistic, it is possible to prove that the $p$-value resulting from such test is a realisation of a uniform distribution (see for example here and here). For these specific cases, the probability density function of the $\mathcal{U}(0,1)$ distribution offers a closed form expression of the distribution of $p$-values under the Null.
However, uniformity breaks down if we test true composite Null hypotheses (as pointed out by @whuber here and addressed in these questions here and here) or if we test false Null hypotheses. In these cases, as well as for cases in which a discrete test statistic is used, we can approximate the distribution of the $p$-values using repeated simulations of the same statistical test.
Now, I was wondering whether it is also possible to find a closed form or analytical expression of the distribution of $p$-values in any of these cases - and if yes, how. A solution to the following example would be enough to get me started, I think.
Concrete example
Let $X \sim \mathcal{N}(\mu,\sigma^2)$, $\sigma^2$ known. Let us then state the following two hypotheses:
$$\begin{align} H_0: \mu \leq \mu_0 \text{ vs } H_1: \mu > \mu_0 \end{align}$$
Let us furthermore assume that $\mu$ is strictly smaller than $\mu_0$, say $\mu = 0 < \mu_0 = 1$. Under these assumptions and using any test statistic that is feasible, what is the closed form or analytical expression of the distribution of the $p$-values?