My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/python-modules/nettigo-air-monitor/default.nix

51 lines
1.0 KiB

{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytest-error-for-skips
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "nettigo-air-monitor";
version = "0.2.6";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "bieniu";
repo = pname;
rev = version;
sha256 = "0zs14g02m1ahyrhl2ihk74fp390g4672r1jjiaawmkxrvib07dvp";
};
propagatedBuildInputs = [
aiohttp
];
checkInputs = [
aioresponses
pytest-asyncio
pytest-error-for-skips
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
substituteInPlace setup.cfg \
--replace "--cov --cov-report term-missing " ""
'';
pythonImportsCheck = [ "nettigo_air_monitor" ];
meta = with lib; {
description = "Python module to get air quality data from Nettigo Air Monitor devices";
homepage = "https://github.com/bieniu/nettigo-air-monitor";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}