1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 poetry-core,
8
9 # dependencies
10 aiohttp,
11
12 # tests
13 pytest-asyncio,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "pyopenweathermap";
19 version = "0.2.2";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "freekode";
24 repo = "pyopenweathermap";
25 # https://github.com/freekode/pyopenweathermap/issues/2
26 tag = "v${version}";
27 hash = "sha256-i/oqjrViATNR+HuG72ZdPMJF9TJf7B1pi+wqCth34OU=";
28 };
29
30 build-system = [ poetry-core ];
31
32 dependencies = [ aiohttp ];
33
34 nativeCheckInputs = [
35 pytest-asyncio
36 pytestCheckHook
37 ];
38
39 disabledTestMarks = [
40 "network"
41 ];
42
43 pythonImportsCheck = [ "pyopenweathermap" ];
44
45 meta = with lib; {
46 description = "Python library for OpenWeatherMap API for Home Assistant";
47 homepage = "https://github.com/freekode/pyopenweathermap";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}