From e67717bc8d545c593f974163a8a496f5f898b73d Mon Sep 17 00:00:00 2001 From: Danny Wilson Date: Tue, 19 Jan 2016 15:59:10 +0100 Subject: [PATCH] glib: fix compilation on SmartOS/Illumos (close #12479) Recent illumos includes a linux-incompatible `inotify.h` header, which configure detects: compilation fails. Also, a newer `dtrace` on SmartOS fails creating the probes ELF linkable object (with `dtrace -G`). Disable for now. Remove old configure option `--disable-modular-tests`. --- pkgs/development/libraries/glib/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 538a40615f14..9a3303684a15 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -68,12 +68,17 @@ stdenv.mkDerivation rec { configureFlags = optional stdenv.isDarwin "--disable-compile-warnings" - ++ optional stdenv.isFreeBSD "--with-libiconv=gnu" - ++ optional stdenv.isSunOS ["--disable-modular-tests" "--with-libiconv"]; + ++ optional (stdenv.isFreeBSD || stdenv.isSunOS) "--with-libiconv=gnu" + ++ optional stdenv.isSunOS "--disable-dtrace"; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl" + optionalString stdenv.isSunOS " -DBSD_COMP"; + preConfigure = if !stdenv.isSunOS then null else + '' + sed -i -e 's|inotify.h|foobar-inotify.h|g' configure + ''; + preBuild = optionalString stdenv.isDarwin '' export MACOSX_DEPLOYMENT_TARGET=