2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
pythonOlder,
|
|
|
|
flit,
|
|
|
|
async-timeout,
|
|
|
|
lxml,
|
|
|
|
httpx,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-httpx,
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "pyrmvtransport";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "0.3.3";
|
2020-07-18 16:06:22 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cgtobi";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-nFxGEyO+wyRzPayjjv8WNIJ+XIWbVn0dyyjQKHiyr40=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-02-17 17:02:09 +00:00
|
|
|
async-timeout
|
2020-11-19 00:13:47 +00:00
|
|
|
httpx
|
2020-07-18 16:06:22 +00:00
|
|
|
lxml
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-17 17:02:09 +00:00
|
|
|
pytestCheckHook
|
2020-07-18 16:06:22 +00:00
|
|
|
pytest-asyncio
|
2021-02-17 17:02:09 +00:00
|
|
|
pytest-httpx
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# should fail, but times out
|
|
|
|
"test__query_rmv_api_fail"
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
patches = [
|
|
|
|
# Can be removed with next release, https://github.com/cgtobi/PyRMVtransport/pull/55
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-tests.patch";
|
|
|
|
url = "https://github.com/cgtobi/PyRMVtransport/commit/fe93b3d9d625f9ccf8eb7b0c39e0ff41c72d2e77.patch";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-t+GP5VG1S86vVSsisl85ZHBtOqxIi7QS83DA+HgRet4=";
|
2022-01-13 20:06:32 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "RMVtransport" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/cgtobi/PyRMVtransport";
|
|
|
|
description = "Get transport information from opendata.rmv.de";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|