1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# build time
6, setuptools-scm
7
8# propagates
9, aiohttp
10
11# tests
12, pytestCheckHook
13}:
14
15let
16 pname = "ukrainealarm";
17 version = "0.0.1";
18in
19
20buildPythonPackage {
21 inherit pname version;
22 format = "setuptools";
23
24 src = fetchFromGitHub {
25 owner = "PaulAnnekov";
26 repo = pname;
27 rev = "v${version}";
28 hash = "sha256-0gsxXQiSkJIM/I0VYsjdCCB3NjPr6QJbD/rBkGrwtW8=";
29 };
30
31 SETUPTOOLS_SCM_PRETEND_VERSION = version;
32
33 nativeBuildInputs = [
34 setuptools-scm
35 ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [
46 "ukrainealarm"
47 "ukrainealarm.client"
48 ];
49
50 meta = with lib; {
51 changelog = "https://github.com/PaulAnnekov/ukrainealarm/releases/tag/v${version}";
52 description = "Implements api.ukrainealarm.com API that returns info about Ukraine air raid alarms";
53 homepage = "https://github.com/PaulAnnekov/ukrainealarm";
54 license = licenses.mit;
55 maintainers = with maintainers; [ hexa ];
56 };
57}
58