2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
anyio,
|
|
|
|
async-generator,
|
|
|
|
h11,
|
|
|
|
curio,
|
|
|
|
overly,
|
|
|
|
pytestCheckHook,
|
|
|
|
trio,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asks";
|
|
|
|
version = "3.0.0";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "theelous3";
|
|
|
|
repo = "asks";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-ipQ5n2386DqR3kNpmTVhNPG+LC7gfCbvrlZ97+UP55g=";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
anyio
|
2023-08-10 07:59:29 +00:00
|
|
|
async-generator
|
2022-06-16 17:23:12 +00:00
|
|
|
h11
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
curio
|
|
|
|
overly
|
|
|
|
pytestCheckHook
|
|
|
|
trio
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.12") [
|
|
|
|
# stuck in threading waiter.acquire()
|
|
|
|
"test_https_get"
|
|
|
|
"test_https_get_checks_cert"
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [ "asks" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Async requests-like HTTP library for Python";
|
|
|
|
homepage = "https://github.com/theelous3/asks";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|