1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 aiohttp,
7 httpx,
8}:
9
10buildPythonPackage rec {
11 pname = "httpx-aiohttp";
12 version = "0.1.8";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "karpetrosyan";
17 repo = "httpx-aiohttp";
18 tag = version;
19 hash = "sha256-Fdu8aKsXWggRkc/512OBEiEwWNAajrhjfG/+v4+cows=";
20 fetchSubmodules = true;
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace-fail "requires = [\"hatchling\", \"hatch-fancy-pypi-readme\"]" \
26 "requires = [\"hatchling\"]"
27 '';
28
29 build-system = [
30 hatchling
31 ];
32
33 dependencies = [
34 aiohttp
35 httpx
36 ];
37
38 pythonImportsCheck = [
39 "httpx_aiohttp"
40 ];
41
42 meta = {
43 description = "Transports for httpx to work atop aiohttp";
44 homepage = "https://github.com/karpetrosyan/httpx-aiohttp/";
45 changelog = "https://github.com/karpetrosyan/httpx-aiohttp/blob/${src.rev}/CHANGELOG.md";
46 license = lib.licenses.bsd3;
47 maintainers = with lib.maintainers; [ sarahec ];
48 };
49}