about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/py-cpuinfo/default.nix
blob: c90f81ae28f8f4da7580dd497e35abba34ffb591 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, fetchFromGitHub
, buildPythonPackage
, pytest
}:

buildPythonPackage rec {
  pname = "py-cpuinfo";
  version = "4.0.0";

  src = fetchFromGitHub {
     owner = "workhorsy";
     repo = pname;
     rev = "v${version}";
     sha256 = "1pp561lj80jnvr2038nrzhmks2akxsbdqxvfrqa6n340x81981lm";
  };

  checkInputs = [
    pytest
  ];

  checkPhase = ''
    runHook preCheck
    pytest -k "not TestActual"
    runHook postCheck
  '';

  meta = {
    description = "Get CPU info with pure Python 2 & 3";
    homepage = https://github.com/workhorsy/py-cpuinfo;
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ costrouc ];
  };
}