2022-03-05 18:23:58 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-06-14 07:51:45 +01:00
|
|
|
, cryptography
|
|
|
|
, defusedxml
|
2022-03-05 18:23:58 +00:00
|
|
|
, fetchFromGitHub
|
2022-06-14 07:51:45 +01:00
|
|
|
, httpretty
|
|
|
|
, lxml
|
2022-03-05 18:23:58 +00:00
|
|
|
, oauthlib
|
|
|
|
, pyjwt
|
2022-06-14 07:51:45 +01:00
|
|
|
, pytestCheckHook
|
2022-03-05 18:23:58 +00:00
|
|
|
, python-jose
|
2022-06-14 07:51:45 +01:00
|
|
|
, python3-openid
|
2022-03-05 18:23:58 +00:00
|
|
|
, python3-saml
|
2022-06-14 07:51:45 +01:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-oauthlib
|
2022-03-05 18:23:58 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "social-auth-core";
|
2022-06-14 06:38:58 +01:00
|
|
|
version = "4.3.0";
|
2022-06-14 07:51:45 +01:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-03-05 18:23:58 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-social-auth";
|
|
|
|
repo = "social-core";
|
2022-06-14 06:38:58 +01:00
|
|
|
rev = "refs/tags/${version}";
|
2022-06-14 07:51:45 +01:00
|
|
|
hash = "sha256-P9IWnu1/PWVNl/tZZ4bqz0WnruKu/jXASZBoaWXWeYI=";
|
2022-03-05 18:23:58 +00:00
|
|
|
};
|
|
|
|
|
2022-06-14 07:51:45 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
defusedxml
|
|
|
|
oauthlib
|
|
|
|
pyjwt
|
|
|
|
python3-openid
|
|
|
|
requests
|
|
|
|
requests-oauthlib
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
openidconnect = [
|
|
|
|
python-jose
|
|
|
|
];
|
|
|
|
saml = [
|
|
|
|
lxml
|
|
|
|
python3-saml
|
|
|
|
];
|
|
|
|
azuread = [
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
httpretty
|
|
|
|
] ++ passthru.optional-dependencies.openidconnect
|
|
|
|
++ passthru.optional-dependencies.saml
|
|
|
|
++ passthru.optional-dependencies.azuread;
|
|
|
|
|
2022-03-05 18:23:58 +00:00
|
|
|
# Disable checking the code coverage
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace social_core/tests/requirements.txt \
|
|
|
|
--replace "coverage>=3.6" "" \
|
|
|
|
--replace "pytest-cov>=2.7.1" ""
|
|
|
|
|
|
|
|
substituteInPlace tox.ini \
|
|
|
|
--replace "{posargs:-v --cov=social_core}" "{posargs:-v}"
|
|
|
|
'';
|
|
|
|
|
2022-06-14 07:51:45 +01:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"social_core"
|
2022-03-05 18:23:58 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-14 07:51:45 +01:00
|
|
|
description = "Module for social authentication/registration mechanisms";
|
2022-03-05 18:23:58 +00:00
|
|
|
homepage = "https://github.com/python-social-auth/social-core";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ n0emis ];
|
|
|
|
};
|
|
|
|
}
|