git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #7845 from spwhitt/misc

Darwin: A couple fixes

commitf93a8ee1105f4cc3770ce339a8c1a4acea3b2fb6 authorEric Seidel <github@eric.seidel.io> dateFri 15 May 2015, 09:06 (12 years ago) parent92587cc5d82c67
9 files changed+25−5
pkgs/development/interpreters/ruby/ruby-1.8.7.nix+3 pkgs/development/libraries/botan/generic.nix+1−1 pkgs/development/libraries/libdvbpsi/default.nix+1−1 pkgs/development/libraries/libev/default.nix+5 pkgs/development/libraries/nghttp2/default.nix+6 pkgs/tools/misc/bandwidth/default.nix+2−1 pkgs/tools/misc/ent/default.nix+2 pkgs/tools/networking/bwm-ng/default.nix+4−1 pkgs/tools/networking/curl/7.15.nix+1−1
pkgs/development/interpreters/ruby/ruby-1.8.7.nix+3
@@ -60,6 +60,9 @@ stdenv.mkDerivation rec {
6060 ];
6161
6262 configureFlags = [ "--enable-shared" "--enable-pthread" ]
63+ # Without this fails due to not finding X11/Xlib.h
64+ # Not sure why this isn't required on Linux
65+ ++ ops stdenv.isDarwin [ "--without-tcl" "--without-tk" ]
6366 ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby";
6467
6568 installFlags = stdenv.lib.optionalString docSupport "install-doc";
pkgs/development/libraries/botan/generic.nix+1−1
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
2121 buildInputs = [ python bzip2 zlib gmp openssl boost ];
2222
2323 configurePhase = ''
24− python configure.py --prefix=$out --with-bzip2 --with-zlib ${if openssl != null then "--with-openssl" else ""} ${extraConfigureFlags}
24+ 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 "" }
2525 '';
2626
2727 enableParallelBuilding = true;
pkgs/development/libraries/libdvbpsi/default.nix+1−1
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
1212 meta = {
1313 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";
1414 homepage = http://www.videolan.org/developers/libdvbpsi.html ;
15− platforms = stdenv.lib.platforms.linux;
15+ platforms = stdenv.lib.platforms.unix;
1616 license = stdenv.lib.licenses.lgpl21;
1717 };
1818
pkgs/development/libraries/libev/default.nix+5
@@ -7,6 +7,11 @@ stdenv.mkDerivation rec {
77 url = "http://dist.schmorp.de/libev/${name}.tar.gz";
88 sha256 = "1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48";
99 };
10+
11+ # Version 4.19 is not valid C11 (which Clang default to)
12+ # Check if this is still necessary on upgrade
13+ NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=c99" else null;
14+
1015 meta = {
1116 description = "A high-performance event loop/event model with lots of features";
1217 maintainers = [ stdenv.lib.maintainers.raskin ];
pkgs/development/libraries/nghttp2/default.nix+6
@@ -42,6 +42,12 @@ stdenv.mkDerivation rec {
4242 sha256 = "000d50yzyysbr9ldhvnbpzn35vplqm08dnmh55wc5zk273gy383f";
4343 };
4444
45+ # Configure script searches for a symbol which does not exist in jemalloc on Darwin
46+ # Reported upstream in https://github.com/tatsuhiro-t/nghttp2/issues/233
47+ postPatch = if (stdenv.isDarwin && optJemalloc != null) then ''
48+ substituteInPlace configure --replace "malloc_stats_print" "je_malloc_stats_print"
49+ '' else null;
50+
4551 nativeBuildInputs = [ pkgconfig ];
4652 buildInputs = [ optJansson optBoost optLibxml2 optJemalloc ]
4753 ++ stdenv.lib.optionals hasApp [ optOpenssl optLibev optZlib ];
pkgs/tools/misc/bandwidth/default.nix+2−1
@@ -19,7 +19,8 @@ stdenv.mkDerivation rec {
1919
2020 buildInputs = [ nasm ];
2121
22− buildFlags = [ arch ];
22+ buildFlags = [ arch ]
23+ ++ stdenv.lib.optionals stdenv.cc.isClang [ "CC=clang" "LD=clang" ];
2324
2425 installPhase = ''
2526 mkdir -p $out/bin
pkgs/tools/misc/ent/default.nix+2
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
1414
1515 buildInputs = [ unzip ];
1616
17+ buildFlags = if stdenv.cc.isClang then [ "CC=clang" ] else null;
18+
1719 installPhase = ''
1820 mkdir -p $out/bin
1921 cp ent $out/bin/
pkgs/tools/networking/bwm-ng/default.nix+4−1
@@ -7,9 +7,12 @@ stdenv.mkDerivation rec {
77 url = "http://www.gropp.org/bwm-ng/${name}.tar.gz";
88 sha256 = "1pgzc8y2y73n72qvbd2g0dkbkw5h0f83k5h9id1rsck8w9c464y1";
99 };
10−
10+
1111 buildInputs = [ ncurses ];
1212
13+ # This code uses inline in the gnu89 sense: see http://clang.llvm.org/compatibility.html#inline
14+ NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=gnu89" else null;
15+
1316 meta = with stdenv.lib; {
1417 description = "A small and simple console-based live network and disk io bandwidth monitor";
1518 homepage = "http://www.gropp.org/?id=projects&sub=bwm-ng";
pkgs/tools/networking/curl/7.15.nix+1−1
@@ -75,6 +75,6 @@ stdenv.mkDerivation rec {
7575 meta = {
7676 homepage = "http://curl.haxx.se/";
7777 description = "A command line tool for transferring files with URL syntax";
78− platforms = stdenv.lib.platforms.all;
78+ platforms = with stdenv.lib.platforms; allBut darwin;
7979 };
8080}