Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-opensky / default.nix
blob0f23163d9affa70c0a55db6ca00c7767a152aa80
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , poetry-core
7 , pydantic
8 , pytest-asyncio
9 , pytestCheckHook
10 , pythonOlder
11 , syrupy
12 , yarl
15 buildPythonPackage rec {
16   pname = "python-opensky";
17   version = "0.2.1";
18   format = "pyproject";
20   disabled = pythonOlder "3.10";
22   src = fetchFromGitHub {
23     owner = "joostlek";
24     repo = "python-opensky";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-xNXFvCUZ/x5ox3KxmG3eA73wpX4fwhvAVmlfcKiT1V8=";
27   };
29   postPatch = ''
30     substituteInPlace pyproject.toml \
31       --replace 'version = "0.0.0"' 'version = "${version}"' \
32       --replace "--cov" ""
33     substituteInPlace src/python_opensky/opensky.py \
34       --replace ".joinpath(uri)" "/ uri"
35   '';
37   nativeBuildInputs = [
38     poetry-core
39   ];
41   propagatedBuildInputs = [
42     aiohttp
43     pydantic
44     yarl
45   ];
47   nativeCheckInputs = [
48     aresponses
49     pytest-asyncio
50     pytestCheckHook
51     syrupy
52   ];
54   pythonImportsCheck = [
55     "python_opensky"
56   ];
58   meta = with lib; {
59     description = "Asynchronous Python client for the OpenSky API";
60     homepage = "https://github.com/joostlek/python-opensky";
61     changelog = "https://github.com/joostlek/python-opensky/releases/tag/v${version}";
62     license = licenses.mit;
63     maintainers = with maintainers; [ fab ];
64   };