From f80f5263194ca2d7fc1735ff5080869ae130e268 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:13:41 -0700 Subject: [PATCH] man-db: use libiconvReal on FreeBSD man-db has extremely strict requirements about the behavior of iconv, since it bundles a copycat script manconv. Not every iconv is appropriate for this, so use the "real" one on the bad platforms. --- pkgs/tools/misc/man-db/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 9e717cad275a..894481fc3fd4 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -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