From b0fcbeecc6f6fb520d31aa6c27858e033dc04906 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Fri, 11 Oct 2024 10:24:30 -0400 Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"man-db:=20fix=20test=20failure=20?= =?UTF-8?q?when=20using=20Darwin=E2=80=99s=20libiconv"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ba7af302dc9a9f27f56178de10efbf0d75df8c4a. --- pkgs/tools/misc/man-db/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 2aa3345186a5..68a394044be7 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -46,11 +46,6 @@ stdenv.mkDerivation rec { # Add mandb locations for the above echo "MANDB_MAP /nix/var/nix/profiles/default/share/man /var/cache/man/nixpkgs" >> src/man_db.conf.in - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - # This test fails on Darwin. man-db expects libiconv to skip over the invalid character in the source data, but - # Darwin’s libiconv returns EILSEQ without skipping it. This causes the `manconv` to go into an infinite loop - # because it keeps trying to convert the invalid character. - sed -i '/manconv-odd-combinations/d' src/tests/Makefile.am ''; configureFlags = [ From 0a83616ca9909b85dbe99ad7fe11c44a04ac4deb Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Fri, 11 Oct 2024 10:30:20 -0400 Subject: [PATCH 2/2] man-db: fix build on Darwin Adapt https://github.com/NixOS/nixpkgs/pull/334985 to work on Darwin. --- pkgs/tools/misc/man-db/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 68a394044be7..9bafa723dcf8 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -14,6 +14,9 @@ , zstd }: +let + libiconv' = if stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD then libiconvReal else libiconv; +in stdenv.mkDerivation rec { pname = "man-db"; version = "2.13.0"; @@ -28,9 +31,8 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ groff makeWrapper pkg-config zstd ]; - 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 + buildInputs = [ libpipeline db groff libiconv' ]; # (Yes, 'groff' is both native and build input) + nativeCheckInputs = [ libiconv' ]; # for 'iconv' binary; make very sure it matches buildinput libiconv patches = [ ./systemwide-man-db-conf.patch