From 04c63bebc7c2c189e70974c5623aca2a9125368a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 May 2021 03:24:07 +0200 Subject: [PATCH] python3Packages.autocaptureproxy: init at 1.0.1 --- .../authcaptureproxy/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/authcaptureproxy/default.nix diff --git a/pkgs/development/python-modules/authcaptureproxy/default.nix b/pkgs/development/python-modules/authcaptureproxy/default.nix new file mode 100644 index 000000000000..0f1f6d046463 --- /dev/null +++ b/pkgs/development/python-modules/authcaptureproxy/default.nix @@ -0,0 +1,60 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, aiohttp +, beautifulsoup4 +, httpx +, importlib-metadata +, multidict +, typer +, yarl +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "authcaptureproxy"; + version = "1.0.1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "alandtse"; + repo = "auth_capture_proxy"; + rev = "v${version}"; + sha256 = "1fbrmh6qa3dm3q3zdxaa0fls94wardbcvnjgwxk686wpjgs1xrs4"; + }; + + postPatch = '' + # https://github.com/alandtse/auth_capture_proxy/issues/14 + substituteInPlace pyproject.toml --replace \ + "poetry.masonry.api" \ + "poetry.core.masonry.api" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + beautifulsoup4 + httpx + importlib-metadata + multidict + typer + yarl + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + meta = with lib; { + description = "A proxy to capture authentication information from a webpage"; + homepage = "https://github.com/alandtse/auth_capture_proxy"; + license = licenses.asl20; + maintainers = with maintainers; [ graham33 hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cc390b22213f..26c4e0e4616d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -605,6 +605,8 @@ in { auth0-python = callPackage ../development/python-modules/auth0-python { }; + authcaptureproxy = callPackage ../development/python-modules/authcaptureproxy { }; + authheaders = callPackage ../development/python-modules/authheaders { }; authlib = callPackage ../development/python-modules/authlib { };