man-db: Fix build on FreeBSD (#334985)

This commit is contained in:
Jörg Thalheim 2024-09-19 07:59:10 +02:00 committed by GitHub
commit a0cc9b8b8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@
, gzip
, lib
, libiconv
, libiconvReal
, libpipeline
, makeWrapper
, nixosTests
@ -28,8 +29,9 @@ stdenv.mkDerivation rec {
strictDeps = true;
nativeBuildInputs = [ autoreconfHook groff makeWrapper pkg-config zstd ];
buildInputs = [ libpipeline db groff ]; # (Yes, 'groff' is both native and build input)
nativeCheckInputs = [ libiconv /* for 'iconv' binary */ ];
buildInputs = [ libpipeline db groff ] # (Yes, 'groff' is both native and build input)
++ lib.optional stdenv.isFreeBSD libiconvReal;
nativeCheckInputs = [ (if stdenv.isFreeBSD then libiconvReal else libiconv) ]; # for 'iconv' binary; make very sure it matches buildinput libiconv
patches = [
./systemwide-man-db-conf.patch
@ -59,6 +61,8 @@ stdenv.mkDerivation rec {
"ac_cv_func__set_invalid_parameter_handler=no"
"ac_cv_func_posix_fadvise=no"
"ac_cv_func_mempcpy=no"
] ++ lib.optionals stdenv.hostPlatform.isFreeBSD [
"--enable-mandirs="
];
preConfigure = ''