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.8.12";
16 pyproject = true;
17
18 disabled = pythonOlder "3.11";
19
20 src = fetchFromGitHub {
21 owner = "alengwenus";
22 repo = "pypck";
23 tag = version;
24 hash = "sha256-XXlHgr8/Cl3eu1vIDl/XykB2gv8PPkPIFEBG30yUue0=";
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 pytestFlags = [ "--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/${src.tag}";
51 license = licenses.epl20;
52 maintainers = with maintainers; [ fab ];
53 };
54}