Skip to content

Commit

Permalink
weechat: Fixed Darwin build issues
Browse files Browse the repository at this point in the history
Build was failing with res_9_init missing on OS X. Resolved with a little help from
Homebrew/homebrew-core#4427.
  • Loading branch information
forficate committed Oct 22, 2016
1 parent 35bcfdb commit 5da4209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkgs/applications/networking/irc/weechat/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14971,6 +14971,7 @@ in

weechat = callPackage ../applications/networking/irc/weechat {
inherit (darwin) libobjc;
inherit (darwin) libresolv;
};

westonLite = callPackage ../applications/window-managers/weston {
Expand Down

0 comments on commit 5da4209

Please sign in to comment.