2021-02-16 17:04:54 +00:00
|
|
|
{ lib
|
|
|
|
, aiodns
|
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
2021-06-28 23:13:55 +00:00
|
|
|
, attrs
|
2021-02-16 17:04:54 +00:00
|
|
|
, brotlipy
|
|
|
|
, buildPythonPackage
|
|
|
|
, cchardet
|
|
|
|
, click
|
|
|
|
, colorama
|
|
|
|
, fetchFromGitHub
|
|
|
|
, halo
|
|
|
|
, poetry-core
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, rich
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "surepy";
|
2021-10-07 14:46:35 +00:00
|
|
|
version = "0.7.2";
|
2021-02-16 17:04:54 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benleb";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-07 14:46:35 +00:00
|
|
|
sha256 = "sha256-yc+jXA4ndFhRZmFPz11HbVs9qaPFNa6WdwXj6hRyjw4=";
|
2021-02-16 17:04:54 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2021-12-06 16:07:01 +00:00
|
|
|
--replace 'aiohttp = {extras = ["speedups"], version = "^3.7.4"}' 'aiohttp = {extras = ["speedups"], version = ">=3.7.4"}' \
|
2022-01-19 23:45:15 +00:00
|
|
|
--replace 'async-timeout = "^3.0.1"' 'async-timeout = ">=3.0.1"' \
|
|
|
|
--replace 'rich = "^10.1.0"' 'rich = ">=10.1.0"'
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiodns
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
2021-06-28 23:13:55 +00:00
|
|
|
attrs
|
2021-02-16 17:04:54 +00:00
|
|
|
brotlipy
|
|
|
|
cchardet
|
|
|
|
click
|
|
|
|
colorama
|
|
|
|
halo
|
|
|
|
requests
|
|
|
|
rich
|
|
|
|
];
|
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
2021-07-24 12:14:16 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"surepy"
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to interact with the Sure Petcare API";
|
|
|
|
homepage = "https://github.com/benleb/surepy";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|