Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / aiowatttime / default.nix
blobfd5da5c330d56c9ad7f965d542b6844e19d0787f
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , fetchpatch
7 , poetry-core
8 , pytest-aiohttp
9 , pytest-asyncio
10 , pytestCheckHook
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "aiowatttime";
16   version = "2023.08.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "bachya";
23     repo = pname;
24     rev = "refs/tags/${version}";
25     hash = "sha256-/ulDImbLOTcoA4iH8e65A01aqqnCLn+01DWuM/4H4p4=";
26   };
28   patches = [
29     # This patch removes references to setuptools and wheel that are no longer
30     # necessary and changes poetry to poetry-core, so that we don't need to add
31     # unnecessary nativeBuildInputs.
32     #
33     #   https://github.com/bachya/aiowatttime/pull/206
34     #
35     (fetchpatch {
36       name = "clean-up-build-dependencies.patch";
37       url = "https://github.com/bachya/aiowatttime/commit/c3cd53f794964c5435148caacd04f4e0ab8f550a.patch";
38       hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
39     })
40   ];
42   nativeBuildInputs = [
43     poetry-core
44   ];
46   propagatedBuildInputs = [
47     aiohttp
48   ];
50   __darwinAllowLocalNetworking = true;
52   nativeCheckInputs = [
53     aresponses
54     pytest-aiohttp
55     pytest-asyncio
56     pytestCheckHook
57   ];
59   # Ignore the examples directory as the files are prefixed with test_
60   disabledTestPaths = [ "examples/" ];
62   pythonImportsCheck = [ "aiowatttime" ];
64   meta = with lib; {
65     description = "Python library for interacting with WattTime";
66     homepage = "https://github.com/bachya/aiowatttime";
67     license = with licenses; [ mit ];
68     maintainers = with maintainers; [ fab ];
69   };