2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
2022-02-10 20:34:41 +00:00
|
|
|
, stdenv
|
2021-01-15 22:18:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchpatch
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-05-24 13:37:59 +00:00
|
|
|
, setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
, wheel
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypck";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.7.17";
|
|
|
|
format = "pyproject";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alengwenus";
|
|
|
|
repo = pname;
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-Vlt4+fRULb9mB0ceRmc7MJ50DnF9DAJPHA8iCbNVvcE=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/alengwenus/pypck/pull/109
|
|
|
|
(fetchpatch {
|
|
|
|
name = "relax-setuptools-dependency.patch";
|
|
|
|
url = "https://github.com/alengwenus/pypck/commit/17023ebe8082120b1eec086842ca809ec6e9df2b.patch";
|
|
|
|
hash = "sha256-kTu1+IwDrcdqelyK/vfhxw8MQBis5I1jag7YTytKQhs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
wheel
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-15 22:18:51 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--asyncio-mode=auto"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
"test_connection_lost"
|
|
|
|
];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pypck"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "LCN-PCK library written in Python";
|
|
|
|
homepage = "https://github.com/alengwenus/pypck";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/alengwenus/pypck/releases/tag/${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = with licenses; [ epl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|