2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, furl
|
2024-02-29 20:09:43 +00:00
|
|
|
, hatchling
|
2021-03-09 03:18:52 +00:00
|
|
|
, jsonschema
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytest-asyncio
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, xmltodict
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pook";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.3.0";
|
|
|
|
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-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-0sS2QJcshMuxxCGlrcVHeIQnVMZbBoJfLsRIxpvl7pM=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
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
|
2021-03-09 03:18:52 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +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 ];
|
|
|
|
};
|
|
|
|
}
|