1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 fetchFromGitHub,
6 gssapi,
7 krb5,
8 pyspnego,
9 pytestCheckHook,
10 pythonOlder,
11 requests,
12}:
13
14buildPythonPackage rec {
15 pname = "requests-credssp";
16 version = "2.0.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "jborean93";
23 repo = pname;
24 rev = "v${version}";
25 hash = "sha256-HHLEmQ+mNjMjpR6J+emrKFM+2PiYq32o7Gnoo0gUrNA=";
26 };
27
28 propagatedBuildInputs = [
29 cryptography
30 pyspnego
31 requests
32 ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 passthru.optional-dependencies = {
37 kerberos = [
38 # pyspnego[kerberos] will have those two dependencies
39 gssapi
40 krb5
41 ];
42 };
43
44 pythonImportsCheck = [ "requests_credssp" ];
45
46 meta = with lib; {
47 description = "HTTPS CredSSP authentication with the requests library";
48 homepage = "https://github.com/jborean93/requests-credssp";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}