Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.0 kB · 75 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576{ lib, stdenv, buildPythonPackage, CoreFoundation, fetchPypi, IOKit, pytestCheckHook, python, pythonOlder}:
buildPythonPackage rec { pname = "psutil"; version = "5.9.6"; format = "setuptools";
inherit stdenv;
disabled = pythonOlder "3.7";
src = fetchPypi { inherit pname version; hash = "sha256-5Lkt3NfdTN0/kAGA6h4QSTLHvOI0+4iXbio7KWRBIlo="; };
buildInputs = # workaround for https://github.com/NixOS/nixpkgs/issues/146760 lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ CoreFoundation ] ++ lib.optionals stdenv.isDarwin [ IOKit ];
nativeCheckInputs = [ pytestCheckHook ];
# Segfaults on darwin: # https://github.com/giampaolo/psutil/issues/1715 doCheck = !stdenv.isDarwin;
# In addition to the issues listed above there are some that occure due to # our sandboxing which we can work around by disabling some tests: # - cpu_times was flaky on darwin # - the other disabled tests are likely due to sanboxing (missing specific errors) pytestFlagsArray = [ # Note: $out must be referenced as test import paths are relative "$out/${python.sitePackages}/psutil/tests/test_system.py" ];
disabledTests = [ # Some of the tests have build-system hardware-based impurities (like # reading temperature sensor values). Disable them to avoid the failures # that sometimes result. "cpu_freq" "cpu_times" "disk_io_counters" "sensors_battery" "sensors_temperatures" "user" "test_disk_partitions" # problematic on Hydra's Linux builders, apparently ];
pythonImportsCheck = [ "psutil" ];
meta = with lib; { description = "Process and system utilization information interface"; homepage = "https://github.com/giampaolo/psutil"; changelog = "https://github.com/giampaolo/psutil/blob/release-${version}/HISTORY.rst"; license = licenses.bsd3; maintainers = with maintainers; [ jonringer ]; };}