12 buildPythonPackage rec {
15 format = "setuptools";
17 disabled = pythonOlder "3.7";
20 inherit pname version;
21 hash = "sha256-fM/N/qT8SwoCyiwx3n/NGGvrnP+CB4AOFKtm95x3OvY=";
25 # workaround for https://github.com/NixOS/nixpkgs/issues/146760
26 lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
28 ] ++ lib.optionals stdenv.isDarwin [
36 # Segfaults on darwin:
37 # https://github.com/giampaolo/psutil/issues/1715
38 doCheck = !stdenv.isDarwin;
40 # In addition to the issues listed above there are some that occure due to
41 # our sandboxing which we can work around by disabling some tests:
42 # - cpu_times was flaky on darwin
43 # - the other disabled tests are likely due to sanboxing (missing specific errors)
45 "$out/${python.sitePackages}/psutil/tests/test_system.py"
48 # Note: $out must be referenced as test import paths are relative
57 pythonImportsCheck = [
62 description = "Process and system utilization information interface";
63 homepage = "https://github.com/giampaolo/psutil";
64 license = licenses.bsd3;
65 maintainers = with maintainers; [ jonringer ];