about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ukrainealarm/default.nix
blob: 00854ded3167325c3e2ce48c9d20fbbd473a693b (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
{ lib
, buildPythonPackage
, fetchFromGitHub

# build time
, setuptools-scm

# propagates
, aiohttp

# tests
, pytestCheckHook
}:

let
  pname = "ukrainealarm";
  version = "0.0.1";
in

buildPythonPackage {
  inherit pname version;
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "PaulAnnekov";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-0gsxXQiSkJIM/I0VYsjdCCB3NjPr6QJbD/rBkGrwtW8=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    aiohttp
  ];

  checkInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "ukrainealarm"
    "ukrainealarm.client"
  ];

  meta = with lib; {
    changelog = "https://github.com/PaulAnnekov/ukrainealarm/releases/tag/v${version}";
    description = "Implements api.ukrainealarm.com API that returns info about Ukraine air raid alarms";
    homepage = "https://github.com/PaulAnnekov/ukrainealarm";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}