1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, pytest
5}:
6
7buildPythonPackage rec {
8 pname = "py-cpuinfo";
9 version = "5.0.0";
10
11 src = fetchFromGitHub {
12 owner = "workhorsy";
13 repo = pname;
14 rev = "v${version}";
15 sha256 = "0lxl9n6djaz5h1zrb2jca4qwl41c2plxy8chr7yhcxnzg0srddqi";
16 };
17
18 checkInputs = [
19 pytest
20 ];
21
22 checkPhase = ''
23 runHook preCheck
24 pytest -k "not TestActual"
25 runHook postCheck
26 '';
27
28 meta = {
29 description = "Get CPU info with pure Python 2 & 3";
30 longDescription = ''
31 Py-cpuinfo gets CPU info with pure Python and should work without any
32 extra programs or libraries, beyond what your OS provides. It does not
33 require any compilation (C/C++, assembly, etc.) to use and works with
34 Python 2 and 3.
35 '';
36 inherit (src.meta) homepage;
37 changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ costrouc ];
40 };
41}