2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-12-02 08:20:57 +00:00
|
|
|
, fetchpatch
|
2021-02-13 14:23:35 +00:00
|
|
|
, pytest-aiohttp
|
2022-12-02 08:20:57 +00:00
|
|
|
, poetry-core
|
2021-02-13 14:23:35 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-cov
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyairnow";
|
|
|
|
version = "1.1.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asymworks";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1hkpfl8rdwyzqrr1drqlmcw3xpv3pi1jf19h1divspbzwarqxs1c";
|
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "switch-to-poetry-core.patch";
|
|
|
|
url = "https://github.com/asymworks/pyairnow/commit/f7a01733a41c648563fc2fe4b559f61ef08b9153.patch";
|
|
|
|
hash = "sha256-lcHnFP3bwkPTi9Zq1dZtShLKyXcxO0XoDF+PgjbWOqs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyairnow" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python wrapper for EPA AirNow Air Quality API";
|
|
|
|
homepage = "https://github.com/asymworks/pyairnow";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|