summary refs log tree commit diff
path: root/pkgs/development/python-modules/requests-credssp/default.nix
blob: 20ce327b4eda047d9a615bdf8d916ce59b0d71b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, buildPythonPackage
, cryptography
, fetchFromGitHub
, gssapi
, krb5
, pyspnego
, pytestCheckHook
, pythonOlder
, requests
}:

buildPythonPackage rec {
  pname = "requests-credssp";
  version = "2.0.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "jborean93";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-HHLEmQ+mNjMjpR6J+emrKFM+2PiYq32o7Gnoo0gUrNA=";
  };

  propagatedBuildInputs = [
    cryptography
    pyspnego
    requests
  ];

  checkInputs = [
    pytestCheckHook
  ];

  passthru.optional-dependencies = {
    kerberos = [
      # pyspnego[kerberos] will have those two dependencies
      gssapi
      krb5
    ];
  };

  pythonImportsCheck = [
    "requests_credssp"
  ];

  meta = with lib; {
    description = "HTTPS CredSSP authentication with the requests library";
    homepage = "https://github.com/jborean93/requests-credssp";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}