Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdata: lm-sensor support #57044

Merged
merged 1 commit into from Apr 27, 2019
Merged

Conversation

nyanloutre
Copy link
Member

@nyanloutre nyanloutre commented Mar 7, 2019

Motivation for this change

Netdata will not find the lm-sensor library without this patch

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -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.so\""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it work on macOS as well:

Suggested change
--replace 'ctypes.util.find_library("sensors")' "\"${lm_sensors.out}/lib/libsensors.so\""
--replace 'ctypes.util.find_library("sensors")' "\"${lm_sensors.out}/lib/libsensors.${stdenv.hostPlatform.extensions.sharedLibrary}\""

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done !

It seems that extensions.sharedLibrary is already prefixed with a dot

@Mic92
Copy link
Member

Mic92 commented Mar 11, 2019

@GrahamcOfBorg build netdata

@nyanloutre
Copy link
Member Author

Oh, lm_sensors is not compatible with MacOS. Maybe I should put a conditional ?

@Lassulus
Copy link
Member

I would go without the conditional for now.

@Lassulus Lassulus merged commit c9d22c2 into NixOS:master Apr 27, 2019
@nyanloutre nyanloutre deleted the netdata-sensors branch July 6, 2019 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants