1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cryptography, 6 fetchFromGitHub, 7 pyspnego, 8 pytest-mock, 9 pytestCheckHook, 10 pythonOlder, 11 requests, 12}: 13 14buildPythonPackage rec { 15 pname = "requests-kerberos"; 16 version = "0.15.0"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "requests"; 23 repo = pname; 24 rev = "v${version}"; 25 hash = "sha256-s1Q3zqKPSuTkiFExr+axai9Eta1xjw/cip8xzfDGR88="; 26 }; 27 28 propagatedBuildInputs = 29 [ 30 cryptography 31 requests 32 pyspnego 33 ] 34 # Avoid broken Python krb5 package on Darwin 35 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) pyspnego.optional-dependencies.kerberos; 36 37 nativeCheckInputs = [ 38 pytestCheckHook 39 pytest-mock 40 ]; 41 42 pythonImportsCheck = [ "requests_kerberos" ]; 43 44 meta = with lib; { 45 description = "Authentication handler for using Kerberos with Python Requests"; 46 homepage = "https://github.com/requests/requests-kerberos"; 47 license = licenses.isc; 48 maintainers = with maintainers; [ catern ]; 49 }; 50}