Previously this was done rather hackily using substituteInPlace in
postFetch, however I've since found out that the way goreleaser does it
is actually quite accessible, since it just calls go with the
appropriate -X flags.
To avoid having to call git in the build to obtain the values and to not
rely on leaveDotGit, we can use the JSON populated by nix-prefetch-git
which contains the extra information we need: the commit hash and the
date.