about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/groff/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/groff/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/groff/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/tools/text/groff/default.nix b/nixpkgs/pkgs/tools/text/groff/default.nix
index 892aeb463f88..5b158f2cbb0e 100644
--- a/nixpkgs/pkgs/tools/text/groff/default.nix
+++ b/nixpkgs/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) ''