about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/monitorcontrol/default.nix
blob: 920074b65f0b5b3d452c944c9402446995df3975 (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
51
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, pyudev
, pytestCheckHook
, voluptuous
}:

buildPythonPackage rec {
  pname = "monitorcontrol";
  version = "3.1.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "newAM";
    repo = "monitorcontrol";
    rev = "refs/tags/${version}";
    hash = "sha256-fu0Lm7Tcw7TCCBDXTTY20JBAM7oeesyeHQFFILeZxX0=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    pyudev
  ];

  nativeCheckInputs = [
    pytestCheckHook
    voluptuous
  ];

  pythonImportsCheck = [
    pname
  ];

  meta = with lib; {
    description = "Python monitor controls using DDC-CI";
    mainProgram = "monitorcontrol";
    homepage = "https://github.com/newAM/monitorcontrol";
    changelog = "https://github.com/newAM/monitorcontrol/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = with maintainers; [ newam ];
  };
}