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