Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 blinker, 4 buildPythonPackage, 5 cryptography, 6 fetchFromGitHub, 7 mock, 8 pyjwt, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12 13 # for passthru.tests 14 django-allauth, 15 django-oauth-toolkit, 16 google-auth-oauthlib, 17 requests-oauthlib, 18}: 19 20buildPythonPackage rec { 21 pname = "oauthlib"; 22 version = "3.2.2"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "oauthlib"; 29 repo = "oauthlib"; 30 rev = "v${version}"; 31 hash = "sha256-KADS1pEaLYi86LEt2VVuz8FVTBANzxC8EeQLgGMxuBU="; 32 }; 33 34 nativeBuildInputs = [ setuptools ]; 35 36 passthru.optional-dependencies = { 37 rsa = [ cryptography ]; 38 signedtoken = [ 39 cryptography 40 pyjwt 41 ]; 42 signals = [ blinker ]; 43 }; 44 45 nativeCheckInputs = [ 46 mock 47 pytestCheckHook 48 ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); 49 50 pythonImportsCheck = [ "oauthlib" ]; 51 52 passthru.tests = { 53 inherit 54 django-allauth 55 django-oauth-toolkit 56 google-auth-oauthlib 57 requests-oauthlib 58 ; 59 }; 60 61 meta = with lib; { 62 changelog = "https://github.com/oauthlib/oauthlib/blob/${src.rev}/CHANGELOG.rst"; 63 description = "Generic, spec-compliant, thorough implementation of the OAuth request-signing logic"; 64 homepage = "https://github.com/oauthlib/oauthlib"; 65 license = licenses.bsd3; 66 maintainers = with maintainers; [ prikhi ]; 67 }; 68}