diff --git a/pkgs/development/interpreters/ruby/ruby-1.8.7.nix b/pkgs/development/interpreters/ruby/ruby-1.8.7.nix index 3c2ea71ecf2..0ae1d1261ee 100644 --- a/pkgs/development/interpreters/ruby/ruby-1.8.7.nix +++ b/pkgs/development/interpreters/ruby/ruby-1.8.7.nix @@ -60,6 +60,9 @@ stdenv.mkDerivation rec { ]; configureFlags = [ "--enable-shared" "--enable-pthread" ] + # Without this fails due to not finding X11/Xlib.h + # Not sure why this isn't required on Linux + ++ ops stdenv.isDarwin [ "--without-tcl" "--without-tk" ] ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"; installFlags = stdenv.lib.optionalString docSupport "install-doc"; diff --git a/pkgs/development/libraries/botan/generic.nix b/pkgs/development/libraries/botan/generic.nix index c843a00b836..5880ae772ce 100644 --- a/pkgs/development/libraries/botan/generic.nix +++ b/pkgs/development/libraries/botan/generic.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ python bzip2 zlib gmp openssl boost ]; configurePhase = '' - python configure.py --prefix=$out --with-bzip2 --with-zlib ${if openssl != null then "--with-openssl" else ""} ${extraConfigureFlags} + python configure.py --prefix=$out --with-bzip2 --with-zlib ${if openssl != null then "--with-openssl" else ""} ${extraConfigureFlags}${if stdenv.cc.isClang then " --cc=clang" else "" } ''; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libdvbpsi/default.nix b/pkgs/development/libraries/libdvbpsi/default.nix index 6af8e7a415e..f8b9e9ecef9 100644 --- a/pkgs/development/libraries/libdvbpsi/default.nix +++ b/pkgs/development/libraries/libdvbpsi/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { meta = { description = "A simple library designed for decoding and generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818 and ITU-T H.222.0"; homepage = http://www.videolan.org/developers/libdvbpsi.html ; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; license = stdenv.lib.licenses.lgpl21; }; diff --git a/pkgs/development/libraries/libev/default.nix b/pkgs/development/libraries/libev/default.nix index 90cab2cc687..ce7d7b9e275 100644 --- a/pkgs/development/libraries/libev/default.nix +++ b/pkgs/development/libraries/libev/default.nix @@ -7,6 +7,11 @@ stdenv.mkDerivation rec { url = "http://dist.schmorp.de/libev/${name}.tar.gz"; sha256 = "1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48"; }; + + # Version 4.19 is not valid C11 (which Clang default to) + # Check if this is still necessary on upgrade + NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=c99" else null; + meta = { description = "A high-performance event loop/event model with lots of features"; maintainers = [ stdenv.lib.maintainers.raskin ]; diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix index e442cc96d2f..bc8c599a901 100644 --- a/pkgs/development/libraries/nghttp2/default.nix +++ b/pkgs/development/libraries/nghttp2/default.nix @@ -42,6 +42,12 @@ stdenv.mkDerivation rec { sha256 = "000d50yzyysbr9ldhvnbpzn35vplqm08dnmh55wc5zk273gy383f"; }; + # Configure script searches for a symbol which does not exist in jemalloc on Darwin + # Reported upstream in https://github.com/tatsuhiro-t/nghttp2/issues/233 + postPatch = if (stdenv.isDarwin && optJemalloc != null) then '' + substituteInPlace configure --replace "malloc_stats_print" "je_malloc_stats_print" + '' else null; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ optJansson optBoost optLibxml2 optJemalloc ] ++ stdenv.lib.optionals hasApp [ optOpenssl optLibev optZlib ]; diff --git a/pkgs/tools/misc/bandwidth/default.nix b/pkgs/tools/misc/bandwidth/default.nix index 35b13448b59..ff5e47336d3 100644 --- a/pkgs/tools/misc/bandwidth/default.nix +++ b/pkgs/tools/misc/bandwidth/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { buildInputs = [ nasm ]; - buildFlags = [ arch ]; + buildFlags = [ arch ] + ++ stdenv.lib.optionals stdenv.cc.isClang [ "CC=clang" "LD=clang" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/ent/default.nix b/pkgs/tools/misc/ent/default.nix index d6ad7f1d26b..71b4ec338df 100644 --- a/pkgs/tools/misc/ent/default.nix +++ b/pkgs/tools/misc/ent/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { buildInputs = [ unzip ]; + buildFlags = if stdenv.cc.isClang then [ "CC=clang" ] else null; + installPhase = '' mkdir -p $out/bin cp ent $out/bin/ diff --git a/pkgs/tools/networking/bwm-ng/default.nix b/pkgs/tools/networking/bwm-ng/default.nix index 62dea1e6cd4..6fa0c20b0ac 100644 --- a/pkgs/tools/networking/bwm-ng/default.nix +++ b/pkgs/tools/networking/bwm-ng/default.nix @@ -7,9 +7,12 @@ stdenv.mkDerivation rec { url = "http://www.gropp.org/bwm-ng/${name}.tar.gz"; sha256 = "1pgzc8y2y73n72qvbd2g0dkbkw5h0f83k5h9id1rsck8w9c464y1"; }; - + buildInputs = [ ncurses ]; + # This code uses inline in the gnu89 sense: see http://clang.llvm.org/compatibility.html#inline + NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=gnu89" else null; + meta = with stdenv.lib; { description = "A small and simple console-based live network and disk io bandwidth monitor"; homepage = "http://www.gropp.org/?id=projects&sub=bwm-ng"; diff --git a/pkgs/tools/networking/curl/7.15.nix b/pkgs/tools/networking/curl/7.15.nix index 2b13437d95c..4e533878ec1 100644 --- a/pkgs/tools/networking/curl/7.15.nix +++ b/pkgs/tools/networking/curl/7.15.nix @@ -75,6 +75,6 @@ stdenv.mkDerivation rec { meta = { homepage = "http://curl.haxx.se/"; description = "A command line tool for transferring files with URL syntax"; - platforms = stdenv.lib.platforms.all; + platforms = with stdenv.lib.platforms; allBut darwin; }; }