2018-08-10 21:36:50 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
2018-09-30 20:19:05 +01:00
|
|
|
, pytest
|
2018-08-10 21:36:50 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-cpuinfo";
|
2020-03-26 12:19:33 +00:00
|
|
|
version = "5.0.0";
|
2018-08-10 21:36:50 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "workhorsy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-03-26 12:19:33 +00:00
|
|
|
sha256 = "0lxl9n6djaz5h1zrb2jca4qwl41c2plxy8chr7yhcxnzg0srddqi";
|
2018-08-10 21:36:50 +01:00
|
|
|
};
|
|
|
|
|
2018-09-30 20:19:05 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
pytest -k "not TestActual"
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2018-08-10 21:36:50 +01:00
|
|
|
meta = {
|
|
|
|
description = "Get CPU info with pure Python 2 & 3";
|
2020-03-26 12:19:33 +00:00
|
|
|
longDescription = ''
|
|
|
|
Py-cpuinfo gets CPU info with pure Python and should work without any
|
|
|
|
extra programs or libraries, beyond what your OS provides. It does not
|
|
|
|
require any compilation (C/C++, assembly, etc.) to use and works with
|
|
|
|
Python 2 and 3.
|
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog";
|
2018-08-10 21:36:50 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|