diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index 892aeb463f8..5b158f2cbb0 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, perl +{ lib, stdenv, fetchurl, fetchpatch, perl , ghostscript #for postscript and html output , psutils, netpbm #for html output , buildPackages @@ -22,6 +22,13 @@ stdenv.mkDerivation rec { patches = [ ./0001-Fix-cross-compilation-by-looking-for-ar.patch + ] + ++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "9") [ + # https://trac.macports.org/ticket/59783 + (fetchpatch { + url = "https://raw.githubusercontent.com/openembedded/openembedded-core/ce265cf467f1c3e5ba2edbfbef2170df1a727a52/meta/recipes-extended/groff/files/0001-Include-config.h.patch"; + sha256 = "1b0mg31xkpxkzlx696nr08rcc7ndpaxdplvysy0hw5099c4n1wyf"; + }) ]; postPatch = lib.optionalString (psutils != null) ''