Skip to content

Commit

Permalink
collectd: fix darwin build (#29841)
Browse files Browse the repository at this point in the history
- liboping supported on darwin since #29849
- libmicrohttpd supported on darwin since #29848
  • Loading branch information
volth authored and LnL7 committed Sep 28, 2017
1 parent d5bf6a0 commit e713349
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions pkgs/tools/system/collectd/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchurl
{ stdenv, fetchurl, darwin
# optional:
, pkgconfig ? null # most of the extra deps need pkgconfig to be found
, curl ? null
Expand Down Expand Up @@ -44,16 +44,22 @@ stdenv.mkDerivation rec {
};

buildInputs = [
pkgconfig curl iptables libatasmart libcredis libdbi libgcrypt libmemcached
cyrus_sasl libmodbus libnotify gdk_pixbuf liboping libpcap libsigrok libvirt
lm_sensors libxml2 lvm2 libmysql postgresql protobufc rabbitmq-c rrdtool
varnish yajl jdk libtool python udev net_snmp hiredis libmnl libmicrohttpd
pkgconfig curl libdbi libgcrypt libmemcached
cyrus_sasl libnotify gdk_pixbuf liboping libpcap libvirt
libxml2 libmysql postgresql protobufc rrdtool
varnish yajl jdk libtool python hiredis libmicrohttpd
] ++ stdenv.lib.optionals stdenv.isLinux [
iptables libatasmart libcredis libmodbus libsigrok
lm_sensors lvm2 rabbitmq-c udev net_snmp libmnl
] ++ stdenv.lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.IOKit
darwin.apple_sdk.frameworks.ApplicationServices
];

# for some reason libsigrok isn't auto-detected
configureFlags =
[ "--localstatedir=/var" ] ++
stdenv.lib.optional (libsigrok != null) "--with-libsigrok" ++
stdenv.lib.optional (stdenv.isLinux && libsigrok != null) "--with-libsigrok" ++
stdenv.lib.optional (python != null) "--with-python=${python}/bin/python";

# do not create directories in /var during installPhase
Expand All @@ -71,7 +77,7 @@ stdenv.mkDerivation rec {
description = "Daemon which collects system performance statistics periodically";
homepage = https://collectd.org;
license = licenses.gpl2;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor fpletz ];
};
}

0 comments on commit e713349

Please sign in to comment.