a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aioresponses
|
|
, buildPythonPackage
|
|
, dacite
|
|
, fetchFromGitHub
|
|
, pytest-asyncio
|
|
, pytest-error-for-skips
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gios";
|
|
version = "2.3.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bieniu";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-/lAENP9wKZ+h2Iq2e9S7s7Naa0CTl/I2cwCxBEAwsrA=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
dacite
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
aioresponses
|
|
pytest-asyncio
|
|
pytest-error-for-skips
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace "--cov --cov-report term-missing " ""
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
disabledTests = [
|
|
# Test requires network access
|
|
"test_invalid_station_id"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"gios"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python client for getting air quality data from GIOS";
|
|
homepage = "https://github.com/bieniu/gios";
|
|
changelog = "https://github.com/bieniu/gios/releases/tag/${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|