1
- { stdenv , fetchurl
1
+ { stdenv , fetchurl , darwin
2
2
# optional:
3
3
, pkgconfig ? null # most of the extra deps need pkgconfig to be found
4
4
, curl ? null
@@ -44,16 +44,22 @@ stdenv.mkDerivation rec {
44
44
} ;
45
45
46
46
buildInputs = [
47
- pkgconfig curl iptables libatasmart libcredis libdbi libgcrypt libmemcached
48
- cyrus_sasl libmodbus libnotify gdk_pixbuf liboping libpcap libsigrok libvirt
49
- lm_sensors libxml2 lvm2 libmysql postgresql protobufc rabbitmq-c rrdtool
50
- varnish yajl jdk libtool python udev net_snmp hiredis libmnl libmicrohttpd
47
+ pkgconfig curl libdbi libgcrypt libmemcached
48
+ cyrus_sasl libnotify gdk_pixbuf liboping libpcap libvirt
49
+ libxml2 libmysql postgresql protobufc rrdtool
50
+ varnish yajl jdk libtool python hiredis libmicrohttpd
51
+ ] ++ stdenv . lib . optionals stdenv . isLinux [
52
+ iptables libatasmart libcredis libmodbus libsigrok
53
+ lm_sensors lvm2 rabbitmq-c udev net_snmp libmnl
54
+ ] ++ stdenv . lib . optionals stdenv . isDarwin [
55
+ darwin . apple_sdk . frameworks . IOKit
56
+ darwin . apple_sdk . frameworks . ApplicationServices
51
57
] ;
52
58
53
59
# for some reason libsigrok isn't auto-detected
54
60
configureFlags =
55
61
[ "--localstatedir=/var" ] ++
56
- stdenv . lib . optional ( libsigrok != null ) "--with-libsigrok" ++
62
+ stdenv . lib . optional ( stdenv . isLinux && libsigrok != null ) "--with-libsigrok" ++
57
63
stdenv . lib . optional ( python != null ) "--with-python=${ python } /bin/python" ;
58
64
59
65
# do not create directories in /var during installPhase
@@ -71,7 +77,7 @@ stdenv.mkDerivation rec {
71
77
description = "Daemon which collects system performance statistics periodically" ;
72
78
homepage = https://collectd.org ;
73
79
license = licenses . gpl2 ;
74
- platforms = platforms . linux ;
80
+ platforms = platforms . unix ;
75
81
maintainers = with maintainers ; [ bjornfor fpletz ] ;
76
82
} ;
77
83
}
0 commit comments