anchor.diff:      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 ];
     };
   }
  
positive.code: { stdenv, fetchurl
  # optional:
  , pkgconfig ? null  # most of the extra deps need pkgconfig to be found
  , curl ? null
  
negative.code:   };
  
    buildInputs = [
      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 (stdenv.isLinux && libsigrok != null) "--with-libsigrok" ++
      stdenv.lib.optional (python != null) "--with-python=${python}/bin/python";
  
    # do not create directories in /var during installPhase
  