Let $G$ be an algebraic group with Lie algebra $\mathfrak g$ and let $\Gamma$ be any finitely generated (discrete) group. One can consider the representation variety $\mathfrak R=\mathrm{Hom}(\Gamma,G)$. If one considers the group scheme $\mathfrak G$ associated to $G$, there is a nice argument that shows that infinitesimal deformations of a homomorphism $\phi\in\mathfrak R(\mathbb R)$ are the (Zariski) tangent space to $\mathfrak R$ at $\phi$ given by the kernel of the map $$ \mathfrak R(\eta)\colon\mathfrak R(\mathbb R[\epsilon])\to \mathfrak R(\mathbb R) $$ where $\mathbb R[\epsilon]$ is the algebra of dual numbers and $\eta$ is the augmentation $\eta(\epsilon)=0$.

One checks that $$\mathfrak R(\mathbb R[\epsilon])=\mathrm{Hom}(\Gamma,\mathfrak G(\mathbb R[\epsilon]))=\mathrm{Hom}(\Gamma,\mathfrak g\rtimes G) $$ and $T_\phi(\mathfrak R)$ is the fibre of $\mathfrak R(\eta)$ over $\phi$, i.e. homomorphisms into $\mathfrak g\rtimes G$ that project onto $\phi$, which must be of the form $\gamma\mapsto(\tau(\gamma),\phi(\gamma))$ for some function $\tau\colon\Gamma\to\mathfrak g$. Finally, the requirement that this homomorphism be indeed a homomorphism implies that $\tau$ must be a $1$-cocycle, i.e. $\tau\in Z^1(\Gamma,\mathfrak g)$, where $\Gamma$ acts on $\mathfrak g$ via $\phi\colon\Gamma\to G$.

My question is, whether the above is also true for Lie groups, which in general may not be algebraic groups.