Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 42 lines 1.1 kB view raw
1{ buildPythonPackage, fetchFromGitHub, isPyPy, lib 2, psutil, setuptools, bottle, batinfo, pysnmp 3, hddtemp, future 4# Optional dependencies: 5, netifaces # IP module 6# Tests: 7, unittest2 8}: 9 10buildPythonPackage rec { 11 pname = "glances"; 12 version = "3.1.2"; 13 disabled = isPyPy; 14 15 src = fetchFromGitHub { 16 owner = "nicolargo"; 17 repo = "glances"; 18 rev = "v${version}"; 19 sha256 = "1z9sq0chhm8m4gq98yfknxj408cj017h7j375blngjk2zvhw39qd"; 20 }; 21 22 # Some tests fail in the sandbox (they e.g. require access to /sys/class/power_supply): 23 patches = lib.optional doCheck ./skip-failing-tests.patch; 24 25 doCheck = true; 26 checkInputs = [ unittest2 ]; 27 28 propagatedBuildInputs = [ psutil setuptools bottle batinfo pysnmp hddtemp future 29 netifaces 30 ]; 31 32 preConfigure = '' 33 sed -i 's/data_files\.append((conf_path/data_files.append(("etc\/glances"/' setup.py; 34 ''; 35 36 meta = with lib; { 37 homepage = https://nicolargo.github.io/glances/; 38 description = "Cross-platform curses-based monitoring tool"; 39 license = licenses.lgpl3; 40 maintainers = with maintainers; [ primeos koral ]; 41 }; 42}