Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pypck / default.nix
blob3eef4a86ce8f97455d13048fc418d4ce13998bcc
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , pytest-asyncio
7 , pytest-timeout
8 , pytestCheckHook
9 , pythonOlder
10 , setuptools
11 , wheel
14 buildPythonPackage rec {
15   pname = "pypck";
16   version = "0.7.17";
17   format = "pyproject";
19   disabled = pythonOlder "3.9";
21   src = fetchFromGitHub {
22     owner = "alengwenus";
23     repo = pname;
24     rev = "refs/tags/${version}";
25     hash = "sha256-Vlt4+fRULb9mB0ceRmc7MJ50DnF9DAJPHA8iCbNVvcE=";
26   };
28   patches = [
29     # https://github.com/alengwenus/pypck/pull/109
30     (fetchpatch {
31       name = "relax-setuptools-dependency.patch";
32       url = "https://github.com/alengwenus/pypck/commit/17023ebe8082120b1eec086842ca809ec6e9df2b.patch";
33       hash = "sha256-kTu1+IwDrcdqelyK/vfhxw8MQBis5I1jag7YTytKQhs=";
34     })
35   ];
37   nativeBuildInputs = [
38     setuptools
39     wheel
40   ];
42   nativeCheckInputs = [
43     pytest-asyncio
44     pytest-timeout
45     pytestCheckHook
46   ];
48   pytestFlagsArray = [
49     "--asyncio-mode=auto"
50   ];
52   disabledTests = lib.optionals stdenv.isDarwin [
53     "test_connection_lost"
54   ];
56   __darwinAllowLocalNetworking = true;
58   pythonImportsCheck = [
59     "pypck"
60   ];
62   meta = with lib; {
63     description = "LCN-PCK library written in Python";
64     homepage = "https://github.com/alengwenus/pypck";
65     changelog = "https://github.com/alengwenus/pypck/releases/tag/${version}";
66     license = with licenses; [ epl20 ];
67     maintainers = with maintainers; [ fab ];
68   };