2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
2021-04-05 15:23:46 +00:00
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, aiounittest
|
2021-01-15 22:18:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonOlder
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "airly";
|
2021-04-05 15:23:46 +00:00
|
|
|
version = "1.1.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ak-ambi";
|
|
|
|
repo = "python-airly";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-weliT/FYnRX+pzVAyRWFly7lfj2z7P+hpq5SIhyIgmI=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# aiounittest is not supported on 3.12
|
|
|
|
doCheck = pythonOlder "3.12";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
aioresponses
|
|
|
|
aiounittest
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd tests
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"InstallationsLoaderTestCase"
|
|
|
|
"MeasurementsSessionTestCase"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
pythonImportsCheck = [ "airly" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for getting air quality data from Airly sensors";
|
|
|
|
homepage = "https://github.com/ak-ambi/python-airly";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|