nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 freezegun,
7 metar,
8 pytest-aiohttp,
9 pytest-asyncio,
10 pytest-cov-stub,
11 pytestCheckHook,
12 setuptools,
13 setuptools-scm,
14 tenacity,
15}:
16
17buildPythonPackage rec {
18 pname = "pynws";
19 version = "2.1.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "MatthewFlamm";
24 repo = "pynws";
25 tag = "v${version}";
26 hash = "sha256-OKq3IdBr/YDWsmyJLHNoffVp2Q0RV+rZU5rm1Ba0FoY=";
27 };
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 dependencies = [
35 aiohttp
36 metar
37 ];
38
39 optional-dependencies.retry = [ tenacity ];
40
41 nativeCheckInputs = [
42 freezegun
43 pytest-aiohttp
44 pytest-asyncio
45 pytest-cov-stub
46 pytestCheckHook
47 ]
48 ++ lib.concatAttrValues optional-dependencies;
49
50 pythonImportsCheck = [ "pynws" ];
51
52 meta = {
53 description = "Python library to retrieve data from NWS/NOAA";
54 homepage = "https://github.com/MatthewFlamm/pynws";
55 changelog = "https://github.com/MatthewFlamm/pynws/releases/tag/v${version}";
56 license = with lib.licenses; [ mit ];
57 maintainers = with lib.maintainers; [ fab ];
58 };
59}