1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytest-timeout,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "pypck";
15 version = "0.7.24";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "alengwenus";
22 repo = "pypck";
23 rev = "refs/tags/${version}";
24 hash = "sha256-DWdQUnURL3WBi916vOTawtBqq+SHTu4iLViGczwAWQE=";
25 };
26
27 postPatch = ''
28 echo "${version}" > VERSION
29 '';
30
31 build-system = [ setuptools ];
32
33 nativeCheckInputs = [
34 pytest-asyncio
35 pytest-timeout
36 pytestCheckHook
37 ];
38
39 pytestFlagsArray = [ "--asyncio-mode=auto" ];
40
41 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_connection_lost" ];
42
43 __darwinAllowLocalNetworking = true;
44
45 pythonImportsCheck = [ "pypck" ];
46
47 meta = with lib; {
48 description = "LCN-PCK library written in Python";
49 homepage = "https://github.com/alengwenus/pypck";
50 changelog = "https://github.com/alengwenus/pypck/releases/tag/${version}";
51 license = with licenses; [ epl20 ];
52 maintainers = with maintainers; [ fab ];
53 };
54}