python3Packages.py-cpuinfo: add sysctl to runtime dependencies
This commit is contained in:
parent
73a617ffa9
commit
d4b7278fbd
@ -1,7 +1,9 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, sysctl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -15,6 +17,13 @@ buildPythonPackage rec {
|
|||||||
sha256 = "10qfaibyb2syiwiyv74l7d97vnmlk079qirgnw3ncklqjs0s3gbi";
|
sha256 = "10qfaibyb2syiwiyv74l7d97vnmlk079qirgnw3ncklqjs0s3gbi";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# On Darwin sysctl is used to read CPU information.
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace cpuinfo/cpuinfo.py \
|
||||||
|
--replace "len(_program_paths('sysctl')) > 0" "True" \
|
||||||
|
--replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'"
|
||||||
|
'';
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user