nixpkgs-suyu/pkgs/development/python-modules/gios/default.nix

58 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-28 09:20:40 +02:00
{ lib
, aiohttp
, aioresponses
, buildPythonPackage
2021-07-27 18:22:11 +02:00
, dacite
2021-05-28 09:20:40 +02:00
, fetchFromGitHub
, pytest-asyncio
, pytest-error-for-skips
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "gios";
2021-07-27 18:22:11 +02:00
version = "2.0.0";
2021-05-28 09:20:40 +02:00
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "bieniu";
repo = pname;
rev = version;
2021-07-27 18:22:11 +02:00
sha256 = "1xbbp08ssan0b9j6s3vzg8cn421avc0xvahx5fvrb8kcbzkg8ssl";
2021-05-28 09:20:40 +02:00
};
propagatedBuildInputs = [
aiohttp
2021-07-27 18:22:11 +02:00
dacite
2021-05-28 09:20:40 +02:00
];
checkInputs = [
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";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}