Patching groff on aarch64-darwin

I’m on aarch64-darwin and using nixpkgs-unstable. I’ve been having some issues the past few days building anything that relies on groff. e.g. Python dependencies, GHC.

The issue is related to groff and a broken symlink.

> ERROR: noBrokenSymlinks: the symlink /nix/store/q5bl29vhbp0vyfzkifnafzcp0drknzm1-groff-1.23.0-doc/share/doc/groff-1.23.0/pdf/mom-pdf.pdf points to a missing target /nix/store/f755ar90gx4zri5d14c48nmpb4ahjcsk-groff-1.23.0/share/doc/groff-1.23.0/examples/mom/mom-pdf.pdf
> ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks

I managed to workaround this by removing the symlink after install phase.

      groffFixed = pkgs.groff.overrideAttrs (oldAttrs: {
        postInstall = ''
          ${oldAttrs.postInstall or ""}
          rm -f $out/share/doc/groff-1.23.0/pdf/mom-pdf.pdf
        '';
      });

I’d be happy to write a commit fix for this if I can get some pointers. I’m not sure what the root cause of the broken symlink is.