2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, dataclasses
|
|
|
|
, fetchPypi
|
|
|
|
, libX11
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "screeninfo";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.7";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "12a97c3527e3544ac5dbd7c1204283e2653d655cbd15844c990a83b1b13ef500";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
|
|
|
|
dataclasses
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libX11
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# We don't have a screen
|
|
|
|
"screeninfo/test_screeninfo.py"
|
|
|
|
];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
pythonImportsCheck = [ "screeninfo" ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-06-18 07:06:33 +00:00
|
|
|
description = "Fetch location and size of physical screens";
|
|
|
|
homepage = "https://github.com/rr-/screeninfo";
|
|
|
|
license = licenses.mit;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = with maintainers; [ nickhu ];
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
}
|