From df885360a6d30f1c2a30deb45bee4ed070f5cef3 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 7 Mar 2019 22:01:48 +0100 Subject: [PATCH] netdata: lm-sensor support --- pkgs/tools/system/netdata/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index cb22022dc43..ec30c1d070c 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoreconfHook, pkgconfig, zlib, libuuid, libossp_uuid, CoreFoundation, IOKit }: +{ stdenv, fetchurl, autoreconfHook, pkgconfig, zlib, libuuid, libossp_uuid, CoreFoundation, IOKit, lm_sensors }: stdenv.mkDerivation rec{ version = "1.11.1"; @@ -23,6 +23,11 @@ stdenv.mkDerivation rec{ $out/libexec/netdata/plugins.d/apps.plugin.org ''; + preConfigure = '' + substituteInPlace collectors/python.d.plugin/python_modules/third_party/lm_sensors.py \ + --replace 'ctypes.util.find_library("sensors")' '"${lm_sensors.out}/lib/libsensors${stdenv.hostPlatform.extensions.sharedLibrary}"' + ''; + configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc"