1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 poetry-core,
7 pyudev,
8 pytestCheckHook,
9 voluptuous,
10}:
11
12buildPythonPackage rec {
13 pname = "monitorcontrol";
14 version = "3.1.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "newAM";
21 repo = "monitorcontrol";
22 rev = "refs/tags/${version}";
23 hash = "sha256-fu0Lm7Tcw7TCCBDXTTY20JBAM7oeesyeHQFFILeZxX0=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [ pyudev ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 voluptuous
33 ];
34
35 pythonImportsCheck = [ pname ];
36
37 meta = with lib; {
38 description = "Python monitor controls using DDC-CI";
39 mainProgram = "monitorcontrol";
40 homepage = "https://github.com/newAM/monitorcontrol";
41 changelog = "https://github.com/newAM/monitorcontrol/blob/v${version}/CHANGELOG.md";
42 license = licenses.mit;
43 platforms = platforms.linux;
44 maintainers = with maintainers; [ newam ];
45 };
46}