Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, buildPythonApplication, fetchFromGitHub, fetchpatch, isPyPy, lib 2, defusedxml, future, ujson, packaging, psutil, setuptools 3# Optional dependencies: 4, bottle, pysnmp 5, hddtemp 6, netifaces # IP module 7, py-cpuinfo 8}: 9 10buildPythonApplication rec { 11 pname = "glances"; 12 version = "3.3.1"; 13 disabled = isPyPy; 14 15 src = fetchFromGitHub { 16 owner = "nicolargo"; 17 repo = "glances"; 18 rev = "refs/tags/v${version}"; 19 sha256 = "sha256-93fghrNktcz+YyPkRl6ZiSZC+3a5TDql6eFZMy6veJc="; 20 }; 21 22 # On Darwin this package segfaults due to mismatch of pure and impure 23 # CoreFoundation. This issues was solved for binaries but for interpreted 24 # scripts a workaround below is still required. 25 # Relevant: https://github.com/NixOS/nixpkgs/issues/24693 26 makeWrapperArgs = lib.optionals stdenv.isDarwin [ 27 "--set" "DYLD_FRAMEWORK_PATH" "/System/Library/Frameworks" 28 ]; 29 30 doCheck = true; 31 preCheck = lib.optionalString stdenv.isDarwin '' 32 export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks 33 ''; 34 35 propagatedBuildInputs = [ 36 bottle 37 defusedxml 38 future 39 ujson 40 netifaces 41 packaging 42 psutil 43 pysnmp 44 setuptools 45 py-cpuinfo 46 ] ++ lib.optional stdenv.isLinux hddtemp; 47 48 meta = with lib; { 49 homepage = "https://nicolargo.github.io/glances/"; 50 description = "Cross-platform curses-based monitoring tool"; 51 changelog = "https://github.com/nicolargo/glances/blob/v${version}/NEWS.rst"; 52 license = licenses.lgpl3Only; 53 maintainers = with maintainers; [ jonringer primeos koral ]; 54 }; 55}