nixpkgs/pkgs/development/python-modules/glances/default.nix

38 lines
982 B
Nix
Raw Normal View History

2018-09-29 10:36:59 +01:00
{ buildPythonPackage, fetchFromGitHub, isPyPy, lib
, psutil, setuptools, bottle, batinfo, pysnmp
, hddtemp
, unittest2
}:
buildPythonPackage rec {
name = "glances-${version}";
2019-01-19 16:17:47 +00:00
version = "3.1.0";
2018-09-29 10:36:59 +01:00
disabled = isPyPy;
src = fetchFromGitHub {
owner = "nicolargo";
repo = "glances";
rev = "v${version}";
2019-01-19 16:17:47 +00:00
sha256 = "0zjpp017i8b8bijdaj85rya7rmdqh4g8vkb42q14q2sw6agxz3zi";
2018-09-29 10:36:59 +01:00
};
patches = lib.optional doCheck ./skip-failing-tests.patch;
2018-09-29 10:36:59 +01:00
# Requires access to /sys/class/power_supply
doCheck = true;
2018-09-29 10:36:59 +01:00
buildInputs = [ unittest2 ];
propagatedBuildInputs = [ psutil setuptools bottle batinfo pysnmp hddtemp ];
preConfigure = ''
sed -i 's/data_files\.append((conf_path/data_files.append(("etc\/glances"/' setup.py;
'';
meta = with lib; {
homepage = https://nicolargo.github.io/glances/;
description = "Cross-platform curses-based monitoring tool";
license = licenses.lgpl3;
maintainers = with maintainers; [ primeos koral ];
};
}