From f6ce3b4dfab60347fd1bafac49b8a609243373cc Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 24 May 2024 09:06:20 -0700 Subject: [PATCH 1/2] libxml2: Test for pthread_create instead of pthread_join on FreeBSD --- pkgs/development/libraries/libxml2/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index d2e614b331a1..9be18b2f5d62 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -37,6 +37,11 @@ stdenv.mkDerivation (finalAttrs: rec { hash = "sha256-JK54/xNjqXPm2L66lBp5RdoqwFbhm1OVautpJ/1s+1Y="; }; + # https://gitlab.gnome.org/GNOME/libxml2/-/issues/725 + postPatch = if stdenv.hostPlatform.isFreeBSD then '' + substituteInPlace ./configure.ac --replace-fail pthread_join pthread_create + '' else null; + strictDeps = true; nativeBuildInputs = [ From 75829eeda01b25856b45bf7ed9fd9db3d3195b39 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 24 May 2024 09:08:18 -0700 Subject: [PATCH 2/2] libxml2: FreeBSD is no longer an impure platform --- pkgs/development/libraries/libxml2/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 9be18b2f5d62..79fe8c9f52da 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -4,7 +4,6 @@ , zlib , pkg-config , autoreconfHook -, xz , libintl , python , gettext @@ -57,11 +56,6 @@ stdenv.mkDerivation (finalAttrs: rec { ncurses ] ++ lib.optionals (stdenv.isDarwin && pythonSupport && python?isPy2 && python.isPy2) [ libintl - ] ++ lib.optionals stdenv.isFreeBSD [ - # Libxml2 has an optional dependency on liblzma. However, on impure - # platforms, it may end up using that from /usr/lib, and thus lack a - # RUNPATH for that, leading to undefined references for its users. - xz ]; propagatedBuildInputs = [