From f80f5263194ca2d7fc1735ff5080869ae130e268 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:13:41 -0700 Subject: [PATCH 1/2] 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 From e9940f7cf34ea15e9fa564ca57b91ac2c7ed9a22 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:18:14 -0700 Subject: [PATCH 2/2] man-db: Use unspecified/all manual directly layout on FreeBSD It's unclear if this nixpkgs bundling conventions are compatible with the BSD layout, but the testcases certainly aren't. https://gitlab.com/man-db/man-db/-/issues/41 --- pkgs/tools/misc/man-db/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 894481fc3fd4..e88a189854f6 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -61,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 = ''