1{ lib
2, aiohttp
3, aresponses
4, buildPythonPackage
5, fetchFromGitHub
6, poetry-core
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "zamg";
12 version = "0.3.1";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "killer0071234";
19 repo = "python-zamg";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-snYRYwJc9H6H+dxaQM4beGvu5AuaXv7W8w5xjR6RPyw=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace " --cov" ""
27 '';
28
29 nativeBuildInputs = [
30 poetry-core
31 ];
32
33 propagatedBuildInputs = [
34 aiohttp
35 ];
36
37 # Module has no tests
38 doCheck = false;
39
40 pythonImportsCheck = [
41 "zamg"
42 ];
43
44 meta = with lib; {
45 description = "Library to read weather data from ZAMG Austria";
46 homepage = "https://github.com/killer0071234/python-zamg";
47 changelog = "https://github.com/killer0071234/python-zamg/releases/tag/v${version}";
48 license = with licenses; [ mit ];
49 maintainers = with maintainers; [ fab ];
50 };
51}