about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/screeninfo/default.nix
blob: 21b3f30e1323be550bb2a46fb2355522242630e5 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, buildPythonApplication
, dataclasses
, fetchPypi
, libX11
, libXinerama
, libXrandr
, pytestCheckHook
, pythonOlder
}:

buildPythonApplication rec {
  pname = "screeninfo";
  version = "0.7";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "12a97c3527e3544ac5dbd7c1204283e2653d655cbd15844c990a83b1b13ef500";
  };

  propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
    dataclasses
  ];

  buildInputs = [
    libX11
    libXinerama
    libXrandr
  ];

  checkInputs = [
    pytestCheckHook
  ];

  disabledTestPaths = [
    # We don't have a screen
    "screeninfo/test_screeninfo.py"
  ];

  pythonImportsCheck = [ "screeninfo" ];

  meta = with lib; {
    description = "Fetch location and size of physical screens";
    homepage = "https://github.com/rr-/screeninfo";
    license = licenses.mit;
    maintainers = with maintainers; [ nickhu ];
  };
}