···1{ lib
2, stdenv
3, fetchFromGitHub
4-, fetchpatch
5, buildPythonPackage
6, pytestCheckHook
7, sysctl
···910buildPythonPackage rec {
11 pname = "py-cpuinfo";
12- version = "7.0.0";
1314 src = fetchFromGitHub {
15 owner = "workhorsy";
16 repo = pname;
17 rev = "v${version}";
18- sha256 = "10qfaibyb2syiwiyv74l7d97vnmlk079qirgnw3ncklqjs0s3gbi";
19 };
2021- patches = [
22- # Make it detect Apple Silicon, remove after https://github.com/workhorsy/py-cpuinfo/pull/161 is merged.
23- (fetchpatch {
24- url = "https://github.com/workhorsy/py-cpuinfo/commit/54c32da6678f9d75ec5acf4534056cdc85c2a04d.patch";
25- sha256 = "sha256-3R46KrpACAQ1V0CQtz48V5mQXxvplUQrXnACtiE8WqY=";
26- })
27- # Continuation of the patch above
28- (fetchpatch {
29- url = "https://github.com/workhorsy/py-cpuinfo/commit/0d00f4b99750f292c85ff23e1039ea9489cb7ec8.patch";
30- sha256 = "sha256-mHoXoCAEG2v3xpQppRFWzSvhYCp5i9CZkbEgtiLVzMs=";
31- })
32- ];
33-34 checkInputs = [
35 pytestCheckHook
36 ];
···42 --replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'"
43 '';
4445- meta = {
46- description = "Get CPU info with pure Python 2 & 3";
0047 longDescription = ''
48 Py-cpuinfo gets CPU info with pure Python and should work without any
49 extra programs or libraries, beyond what your OS provides. It does not
50 require any compilation (C/C++, assembly, etc.) to use and works with
51- Python 2 and 3.
52 '';
53- inherit (src.meta) homepage;
54 changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog";
55- license = lib.licenses.mit;
56- maintainers = with lib.maintainers; [ costrouc ];
57 };
58}
···1{ lib
2, stdenv
3, fetchFromGitHub
04, buildPythonPackage
5, pytestCheckHook
6, sysctl
···89buildPythonPackage rec {
10 pname = "py-cpuinfo";
11+ version = "8.0.0";
1213 src = fetchFromGitHub {
14 owner = "workhorsy";
15 repo = pname;
16 rev = "v${version}";
17+ sha256 = "sha256-Mgzj1HTasUNHeHMVwV6d+TeyVqnBNUwCJ1EC3kfovf8=";
18 };
19000000000000020 checkInputs = [
21 pytestCheckHook
22 ];
···28 --replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'"
29 '';
3031+ pythonImportsCheck = [ "cpuinfo" ];
32+33+ meta = with lib; {
34+ description = "Get CPU info with pure Python";
35 longDescription = ''
36 Py-cpuinfo gets CPU info with pure Python and should work without any
37 extra programs or libraries, beyond what your OS provides. It does not
38 require any compilation (C/C++, assembly, etc.) to use and works with
39+ Python.
40 '';
41+ homepage = "https://github.com/workhorsy/py-cpuinfo";
42 changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog";
43+ license = licenses.mit;
44+ maintainers = with maintainers; [ costrouc ];
45 };
46}