diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-06-03 11:32:35 -0400 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-07-01 00:58:06 -0400 |
commit | 75f431fb84e45c4830b803dbd6dd75f6baf4db1b (patch) | |
tree | f33f0bfc132e327abbacbd635e5ee0acaf0dcd59 /pkgs/tools/typesetting/xmlto | |
parent | 7cb8db1c029996e57b1a9d04b75963d01d0955bc (diff) | |
download | nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.tar nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.tar.gz nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.tar.bz2 nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.tar.lz nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.tar.xz nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.tar.zst nixlib-75f431fb84e45c4830b803dbd6dd75f6baf4db1b.zip |
xmlto: fix build with clang 16
Fix implicit `int` on `main` and `static` declarations. Clang 16 reports these as errors.
Diffstat (limited to 'pkgs/tools/typesetting/xmlto')
-rw-r--r-- | pkgs/tools/typesetting/xmlto/default.nix | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/pkgs/tools/typesetting/xmlto/default.nix b/pkgs/tools/typesetting/xmlto/default.nix index 5c34ff7554d3..09597be8540d 100644 --- a/pkgs/tools/typesetting/xmlto/default.nix +++ b/pkgs/tools/typesetting/xmlto/default.nix @@ -1,5 +1,5 @@ -{ fetchurl, lib, stdenv, libxml2, libxslt -, docbook_xml_dtd_45, docbook_xsl, w3m +{ fetchurl, fetchpatch, lib, stdenv, libxml2, libxslt +, docbook_xml_dtd_45, docbook_xsl, flex, w3m , bash, getopt, makeWrapper }: stdenv.mkDerivation rec { @@ -10,6 +10,20 @@ stdenv.mkDerivation rec { sha256 = "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"; }; + # Note: These patches modify `xmlif/xmlif.l`, which requires `flex` to be rerun. + patches = [ + # Fixes implicit `int` on `main`, which is an error with clang 16. + (fetchpatch { + url = "https://pagure.io/xmlto/c/8e34f087bf410bcc5fe445933d6ad9bae54f24b5.patch"; + hash = "sha256-z5riDBZBVuFeBcjI++dAl3nTIgOPau4Gag0MJbYt+cc="; + }) + # Fixes implicit `int` on `ifsense`, which is also an error with clang 16. + (fetchpatch { + url = "https://pagure.io/xmlto/c/1375e2df75530cd198bd16ac3de38e2b0d126276.patch"; + hash = "sha256-fM6ZdTigrcC9cbXiKu6oa5Hs71mrREockB1wRlw6nDk="; + }) + ]; + postPatch = '' patchShebangs xmlif/test/run-test @@ -23,7 +37,7 @@ stdenv.mkDerivation rec { # `libxml2' provides `xmllint', needed at build-time and run-time. # `libxslt' provides `xsltproc', used by `xmlto' at run-time. - nativeBuildInputs = [ makeWrapper getopt ]; + nativeBuildInputs = [ makeWrapper flex getopt ]; buildInputs = [ libxml2 libxslt docbook_xml_dtd_45 docbook_xsl ]; postInstall = '' |