1{ lib
2, buildPythonPackage
3, cryptography
4, fetchPypi
5, httpx
6, pyspnego
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "httpx-ntlm";
12 version = "1.0.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 pname = "httpx_ntlm";
19 inherit version;
20 hash = "sha256-pv/OxgcO0JWk2nCZp+bKlOdX7NqV6V5xZRDy5dd13qQ=";
21 };
22
23 propagatedBuildInputs = [
24 cryptography
25 httpx
26 pyspnego
27 ];
28
29 postPatch = ''
30 substituteInPlace setup.py \
31 --replace "pyspnego==0.3.*" "pyspnego>=0.3.*" \
32 --replace "cryptography==36.0.*" "cryptography>=36.0.*"
33 '';
34
35 # https://github.com/ulodciv/httpx-ntlm/issues/5
36 doCheck = false;
37
38 pythonImportsCheck = [
39 "httpx_ntlm"
40 ];
41
42 meta = with lib; {
43 description = "NTLM authentication support for HTTPX";
44 homepage = "https://github.com/ulodciv/httpx-ntlm";
45 license = licenses.isc;
46 maintainers = with maintainers; [ fab ];
47 };
48}