1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6}:
7
8buildPythonPackage rec {
9 pname = "aqipy-atmotech";
10 version = "0.1.5";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "atmotube";
17 repo = "aqipy";
18 rev = version;
19 hash = "sha256-tqHhfJmtVFUSO57Cid9y3LK4pOoG7ROtwDT2hY5IE1Y=";
20 };
21
22 nativeCheckInputs = [
23 pytestCheckHook
24 ];
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace "'pytest-runner'" ""
29 '';
30
31 pythonImportsCheck = [
32 "aqipy"
33 ];
34
35 meta = with lib; {
36 description = "Library for AQI calculation";
37 homepage = "https://github.com/atmotube/aqipy";
38 license = licenses.asl20;
39 maintainers = with maintainers; [ fab ];
40 };
41}