2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
furl,
|
|
|
|
hatchling,
|
|
|
|
jsonschema,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-httpbin,
|
|
|
|
pytest7CheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
xmltodict,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pook";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.4.3";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "h2non";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "pook";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-sdfkMvPSlVK7EoDUEuJbiuocOjGJygqiCiftrsjnDhU=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
furl
|
|
|
|
jsonschema
|
|
|
|
requests
|
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-asyncio
|
2024-04-21 15:54:59 +00:00
|
|
|
pytest-httpbin
|
|
|
|
pytest7CheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pook" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't test integrations
|
|
|
|
"tests/integration/"
|
|
|
|
# Tests require network access
|
|
|
|
"tests/unit/interceptors/"
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
description = "HTTP traffic mocking and testing";
|
2021-03-09 03:18:52 +00:00
|
|
|
homepage = "https://github.com/h2non/pook";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/h2non/pook/blob/v${version}/History.rst";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|