Andrzej Szczepański pointed me to Proposition 2.3.13 in the book [Perfect Groups, Derek F. Holt and Wilhelm Plesken, 1989], which gives an answer to my question.
Namely, in a slightly different terminology Proposition 2.3.13 shows that if $G$ is the fundamental group of a closed flat manifold with holonomy group $Q$, then its commutator subgroup $G^\prime = [G,G]$ is the fundamental group of a closed flat manifold with holonomy group isomorphic to $Q^\prime=[Q,Q]$, and moreover, if $Q$ is perfect, then so is $G^\prime$. Recall that a group is perfect if it has no nontrivial abelian quotients, or equivalently, the group equals its commutator subgroup.
It is known that every finite group occurs as holonomy group of a closed flat manifold, see [On the Holonomy Group of Locally Euclidean Spaces, L. Auslander and M. Kuranishi, Annals of Mathematics, 1957].
Thus if we start from any finite perfect group $Q$, and let $G$ be the fundamental group of a closed flat manifold with holonomy $Q$, then $G^\prime$ is a perfect group that isand also the fundamental group of a closed flat manifold, and the with holonomy group of $G^\prime$ is isomorphic to $Q$.
To see why we replace $G$ by $G^\prime$ note that $G^\prime$ and $G^\prime\times \mathbb Z$ have the same holonomy, and the latter group is not perfect.