From c3d54620fdd8987ba5fc8ca110fd3fa521917c5f Mon Sep 17 00:00:00 2001 From: annalee <168274788+annaleeleaves@users.noreply.github.com> Date: Mon, 13 May 2024 11:11:15 +0000 Subject: [PATCH] rubyPackages_3_{2,3}.nokogiri: add libxml2 to darwin buildInputs; unbreak fix build failure on darwin: ``` checking for xmlParseDoc() in -lxml2... no checking for xmlParseDoc() in -llibxml2... no checking for libxml-2.0 using `pkg_config`... no Please install either the `pkg-config` utility or the `pkg-config` rubygem. checking for xmlParseDoc() in -lxml2... no checking for xmlParseDoc() in -llibxml2... no ----- extconf.rb:295:in `ensure_package_configuration' extconf.rb:704:in `
' xml2 is missing. Please locate mkmf.log to investigate how it is failing. ``` --- pkgs/development/ruby-modules/gem-config/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index e6018b06fa99..02d014bef899 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -586,7 +586,7 @@ in ]; }; - nokogiri = attrs: { + nokogiri = attrs: ({ buildFlags = [ "--use-system-libraries" "--with-zlib-lib=${zlib.out}/lib" @@ -601,7 +601,9 @@ in "--with-iconv-dir=${libiconv}" "--with-opt-include=${libiconv}/include" ]; - }; + } // lib.optionalAttrs stdenv.isDarwin { + buildInputs = [ libxml2 ]; + }); openssl = attrs: { # https://github.com/ruby/openssl/issues/369