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 = "requests-kerberos"; 24 rev = "v${version}"; 25 hash = "sha256-s1Q3zqKPSuTkiFExr+axai9Eta1xjw/cip8xzfDGR88="; 26 }; 27 28 propagatedBuildInputs = [ 29 cryptography 30 requests 31 pyspnego 32 ] 33 # Avoid broken Python krb5 package on Darwin 34 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) pyspnego.optional-dependencies.kerberos; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 pytest-mock 39 ]; 40 41 pythonImportsCheck = [ "requests_kerberos" ]; 42 43 meta = with lib; { 44 description = "Authentication handler for using Kerberos with Python Requests"; 45 homepage = "https://github.com/requests/requests-kerberos"; 46 license = licenses.isc; 47 maintainers = with maintainers; [ catern ]; 48 }; 49}