From 5da42092faef25e46d93833fe7a0debe8be0f663 Mon Sep 17 00:00:00 2001 From: Adam Evans Date: Thu, 20 Oct 2016 23:28:27 +1100 Subject: [PATCH] weechat: Fixed Darwin build issues Build was failing with res_9_init missing on OS X. Resolved with a little help from https://github.com/Homebrew/homebrew-core/pull/4427. --- pkgs/applications/networking/irc/weechat/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 17f754f6acca..911555fa6a61 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, ncurses, openssl, aspell, gnutls , zlib, curl , pkgconfig, libgcrypt -, cmake, makeWrapper, libobjc, libiconv +, cmake, makeWrapper, libobjc, libresolv, libiconv , asciidoctor # manpages , guileSupport ? true, guile , luaSupport ? true, lua5 @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { cmake asciidoctor ] - ++ optionals stdenv.isDarwin [ pync libobjc ] + ++ optionals stdenv.isDarwin [ pync libobjc libresolv ] ++ optional guileSupport guile ++ optional luaSupport lua5 ++ optional perlSupport perl @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}" # Fix '_res_9_init: undefined symbol' error - + (stdenv.lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1"); + + (stdenv.lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv"); postInstall = with stdenv.lib; '' NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d2ce993be238..01d85aea53ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14971,6 +14971,7 @@ in weechat = callPackage ../applications/networking/irc/weechat { inherit (darwin) libobjc; + inherit (darwin) libresolv; }; westonLite = callPackage ../applications/window-managers/weston {