Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyopenuv / default.nix
blob0b36f9b735447067f4e956bb4c53af3f852b3a1a
1 { lib
2 , aiohttp
3 , aresponses
4 , backoff
5 , buildPythonPackage
6 , fetchFromGitHub
7 , fetchpatch
8 , poetry-core
9 , pytest-aiohttp
10 , pytest-asyncio
11 , pytestCheckHook
12 , pythonOlder
15 buildPythonPackage rec {
16   pname = "pyopenuv";
17   version = "2023.08.0";
18   format = "pyproject";
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "bachya";
24     repo = pname;
25     rev = "refs/tags/${version}";
26     hash = "sha256-6JYYkEH873beEQf2agAF85YLSb7+n0UVzIuRz3amXpU=";
27   };
29   patches = [
30     # This patch removes references to setuptools and wheel that are no longer
31     # necessary and changes poetry to poetry-core, so that we don't need to add
32     # unnecessary nativeBuildInputs.
33     #
34     #   https://github.com/bachya/pyopenuv/pull/244
35     #
36     (fetchpatch {
37       name = "clean-up-build-dependencies.patch";
38       url = "https://github.com/bachya/pyopenuv/commit/1663f697dd5528fb03af1400e5ffd3fba076c64c.patch";
39       hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
40     })
41   ];
43   nativeBuildInputs = [
44     poetry-core
45   ];
47   propagatedBuildInputs = [
48     aiohttp
49     backoff
50   ];
52   __darwinAllowLocalNetworking = true;
54   nativeCheckInputs = [
55     aresponses
56     pytest-asyncio
57     pytest-aiohttp
58     pytestCheckHook
59   ];
61   disabledTestPaths = [
62     # Ignore the examples as they are prefixed with test_
63     "examples/"
64   ];
66   pythonImportsCheck = [
67     "pyopenuv"
68   ];
70   meta = with lib; {
71     description = "Python API to retrieve data from openuv.io";
72     homepage = "https://github.com/bachya/pyopenuv";
73     changelog = "https://github.com/bachya/pyopenuv/releases/tag/${version}";
74     license = with licenses; [ mit ];
75     maintainers = with maintainers; [ fab ];
76   };