Hi Branden, hi Phong
I'd like to offer some personal insights and possible workarounds on
this, as I've been building from a distribution archive and a
snapshot archive.
By snapshot archive I mean any archive (tgz, zip) from a commit
bundled by your forge of choice, e.g.:
https://api.github.com/repos/coreutils/gnulib/tarball/833eea6be5607a85bc964bf728a7a82ca461b5b1
(Couldn't find how to fetch a snapshot archive for groff from Savannah,
hence the coreutils github example url)
When no distribution archive is available snapshot archives are
preferred in nixpkgs over a real, even just a shallow,
git (or other VCS) clone, because snapshot archives do not contain the
VCS history, which takes a toll on build systems and caches.
The VCS history isn't really relevant for building the software, unless
of course the project includes a commit hash in the version info.
>From a distribution (nixpkgs/NixOS) perspective I find this "annoying";
from a software builder perspective I see the value in having it.
To build groff from a snapshot archive I'm doing the following to
work around the issues that stem from it. Note these are hacky and
only for my personal and not nixpkgs upstream use.
1. sed -i '/m4_esyscmd/s/.*/${finalAttrs.version}/' configure.ac
where ${finalAttrs.version} is the version I'd like to give groff.
For snapshot builds nixpkgs recommends something along the lines of:
groff-1.25.0.rc1-unstable-2026-07-22
2. Calling ./bootstrap --no-git --gnulib-srcdir=${gnulib}
before running autoconf (in nixpkgs terms in the preAutoconf phase).
Here ${gnulib} is a reference to the gnulib package in nixpkgs
and will be replaced by the path to gnulib in the nix store (not
sure what the Guix equivalent term is).
3. Add --enable-maintainer-mode to the configure flags.
4. After configure is run
sed Makefile -e 's/$(LN_S) $(exampledir)/mv $(exampledir)/'
since this results in a dangling symlink in nixpkgs, which it
doesn't like. This might not be an issue in Guix.
As an added measure I'm running find $doc -xtype l -delete
where $doc refers to the install documentation, just to ensure it
does not contain symlinks to the groff build.
With these changes to the existing groff nixpkgs, I am able to build
groff from a snapshot archive using nixpkgs.
Hope this helps :)
Alexis