2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
2021-08-12 14:41:47 +00:00
|
|
|
, backoff
|
2021-02-13 14:23:35 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-02-16 17:41:37 +00:00
|
|
|
, fetchpatch
|
2021-02-13 14:23:35 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
2021-02-13 14:23:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyopenuv";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "2023.02.0";
|
2021-02-13 14:23:35 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-EiTTck6hmOGSQ7LyZsbhnH1zgkH8GccejLdJaH2m0F8=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
patches = [
|
|
|
|
# Remove asynctest, https://github.com/bachya/pyopenuv/pull/108
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-asynctest.patch";
|
|
|
|
url = "https://github.com/bachya/pyopenuv/commit/af15736b0d82ef811c3f380f5da32007752644fe.patch";
|
|
|
|
hash = "sha256-5uQS3DoM91mhfyxLTNii3JBxwXIDK4/GwtadkVagjuw=";
|
|
|
|
})
|
2023-10-09 19:29:22 +00:00
|
|
|
# This patch removes references to setuptools and wheel that are no longer
|
|
|
|
# necessary and changes poetry to poetry-core, so that we don't need to add
|
|
|
|
# unnecessary nativeBuildInputs.
|
|
|
|
#
|
|
|
|
# https://github.com/bachya/pyopenuv/pull/244
|
|
|
|
#
|
|
|
|
(fetchpatch {
|
|
|
|
name = "clean-up-build-dependencies.patch";
|
|
|
|
url = "https://github.com/bachya/pyopenuv/commit/1663f697dd5528fb03af1400e5ffd3fba076c64c.patch";
|
|
|
|
hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
|
|
|
|
})
|
2023-02-16 17:41:37 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2021-08-12 14:41:47 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
backoff
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-13 14:23:35 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Ignore the examples as they are prefixed with test_
|
|
|
|
"examples/"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyopenuv"
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API to retrieve data from openuv.io";
|
|
|
|
homepage = "https://github.com/bachya/pyopenuv";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/bachya/pyopenuv/releases/tag/${version}";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|