1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pyserial,
6 pytestCheckHook,
7 pythonAtLeast,
8 pythonOlder,
9 setuptools,
10 standard-telnetlib,
11}:
12
13buildPythonPackage rec {
14 pname = "nad-receiver";
15 version = "0.3.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "joopert";
22 repo = "nad_receiver";
23 rev = version;
24 hash = "sha256-jRMk/yMA48ei+g/33+mMYwfwixaKTMYcU/z/VOoJbvY=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [ pyserial ] ++ lib.optionals (pythonAtLeast "3.13") [ standard-telnetlib ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "nad_receiver" ];
34
35 meta = with lib; {
36 description = "Python interface for NAD receivers";
37 homepage = "https://github.com/joopert/nad_receiver";
38 changelog = "https://github.com/joopert/nad_receiver/releases/tag/${version}";
39 license = licenses.mit;
40 maintainers = with maintainers; [ fab ];
41 };
42}