2019-10-08 09:26:32 +01:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
2021-01-11 11:16:08 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
2019-10-08 09:26:32 +01:00
|
|
|
, pytest
|
|
|
|
, pytest-asyncio
|
2021-01-18 19:43:31 +00:00
|
|
|
, pytest-cov
|
2021-01-11 11:16:08 +00:00
|
|
|
, pytestCheckHook
|
2019-10-08 09:26:32 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aresponses";
|
2021-02-04 12:28:38 +00:00
|
|
|
version = "2.1.4";
|
2019-10-08 09:26:32 +01:00
|
|
|
|
2020-09-09 17:10:21 +01:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2021-01-11 11:16:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CircleUp";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-02-04 12:28:38 +00:00
|
|
|
sha256 = "sha256-crMiMZ2IDuYDFt8Bixg3NRhlUa2tqmfzd7ZeHM+2Iu4=";
|
2019-10-08 09:26:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
|
|
|
|
2021-01-11 11:16:08 +00:00
|
|
|
checkInputs = [
|
|
|
|
aiohttp
|
|
|
|
pytest-asyncio
|
2021-01-18 19:43:31 +00:00
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
2021-01-11 11:16:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Disable tests which requires network access
|
|
|
|
disabledTests = [
|
|
|
|
"test_foo"
|
|
|
|
"test_passthrough"
|
|
|
|
];
|
|
|
|
|
2021-01-18 19:43:31 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-11 11:16:08 +00:00
|
|
|
pythonImportsCheck = [ "aresponses" ];
|
2019-10-08 09:26:32 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Asyncio testing server";
|
|
|
|
homepage = "https://github.com/circleup/aresponses";
|
|
|
|
license = licenses.mit;
|
2021-01-11 11:16:08 +00:00
|
|
|
maintainers = with maintainers; [ makefu ];
|
2019-10-08 09:26:32 +01:00
|
|
|
};
|
|
|
|
}
|