1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, aiohttp
6, beautifulsoup4
7, httpx
8, importlib-metadata
9, multidict
10, typer
11, yarl
12, pytest-asyncio
13, pytestCheckHook
14}:
15
16buildPythonPackage rec {
17 pname = "authcaptureproxy";
18 version = "1.1.4";
19 format = "pyproject";
20
21 src = fetchFromGitHub {
22 owner = "alandtse";
23 repo = "auth_capture_proxy";
24 rev = "refs/tags/v${version}";
25 sha256 = "sha256-4IPBulzRoAAplyM/1MPE40IW4IXBIGYLydzpY64Gl0c=";
26 };
27
28 postPatch = ''
29 # https://github.com/alandtse/auth_capture_proxy/issues/14
30 # https://github.com/alandtse/auth_capture_proxy/issues/15
31 substituteInPlace pyproject.toml \
32 --replace "poetry.masonry.api" "poetry.core.masonry.api" \
33 --replace 'importlib-metadata = "^3.4.0"' 'importlib-metadata = "*"'
34 '';
35
36 nativeBuildInputs = [
37 poetry-core
38 ];
39
40 propagatedBuildInputs = [
41 aiohttp
42 beautifulsoup4
43 httpx
44 importlib-metadata
45 multidict
46 typer
47 yarl
48 ];
49
50 checkInputs = [
51 pytest-asyncio
52 pytestCheckHook
53 ];
54
55 meta = with lib; {
56 description = "A proxy to capture authentication information from a webpage";
57 homepage = "https://github.com/alandtse/auth_capture_proxy";
58 license = licenses.asl20;
59 maintainers = with maintainers; [ graham33 hexa ];
60 };
61}