summary refs log tree commit diff
path: root/pkgs/development/python-modules/aio-geojson-geonetnz-volcano/default.nix
blob: ad213243925d2d837e89fb3eeb50bb8f4b183d76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ lib
, aio-geojson-client
, aiohttp
, aresponses
, mock
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pytest-asyncio
, pytestCheckHook
, pytz
, pythonOlder
}:

buildPythonPackage rec {
  pname = "aio-geojson-geonetnz-volcano";
  version = "0.7";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "exxamalte";
    repo = "python-aio-geojson-geonetnz-volcano";
    rev = "refs/tags/v${version}";
    sha256 = "sha256-2iVUHMk4ydmGmmGS6lJV5pvxJHyP9bRSeh/dOXbquE0=";
  };

  patches = [
    # Remove asynctest, https://github.com/exxamalte/python-aio-geojson-geonetnz-volcano/pull/18
    (fetchpatch {
      name = "remove-asynctest.patch";
      url = "https://github.com/exxamalte/python-aio-geojson-geonetnz-volcano/commit/d04a488130375c78efa541fd63a5d88bd6b0fd49.patch";
      hash = "sha256-ArG8CovJckzzNebd03WeU5i/jPqy2HRVBL3ICk5nZ5Y=";
    })
  ];

  propagatedBuildInputs = [
    aio-geojson-client
    aiohttp
    pytz
  ];

  nativeCheckInputs = [
    aresponses
    mock
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "aio_geojson_geonetnz_volcano"
  ];

  meta = with lib; {
    description = "Python module for accessing the GeoNet NZ Volcanic GeoJSON feeds";
    homepage = "https://github.com/exxamalte/pythonaio-geojson-geonetnz-volcano";
    changelog = "https://github.com/exxamalte/python-aio-geojson-geonetnz-volcano/blob/v${version}/CHANGELOG.md";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ fab ];
  };
}