2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, cryptography
|
|
|
|
, defusedxml
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, importlib-resources
|
|
|
|
, mock
|
|
|
|
, pyasn1
|
|
|
|
, pymongo
|
|
|
|
, pyopenssl
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, responses
|
2022-06-16 17:23:12 +00:00
|
|
|
, setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
, six
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
2021-12-06 16:07:01 +00:00
|
|
|
, xmlschema
|
2020-04-24 23:36:52 +00:00
|
|
|
, xmlsec
|
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
|
|
|
pymongo3 = pymongo.overridePythonAttrs(old: rec {
|
|
|
|
version = "3.12.3";
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "pymongo";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-ConK3ABipeU2ZN3gQ/bAlxcrjBxfAJRJAJUoL/mZWl8=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pysaml2";
|
2022-09-11 15:47:08 +00:00
|
|
|
version = "7.2.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "IdentityPython";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-11 15:47:08 +00:00
|
|
|
sha256 = "sha256-lnaizwbtBYdKx1puizah+UWsw54NVW6UhEw/eStl1WI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
defusedxml
|
|
|
|
pyopenssl
|
2022-06-16 17:23:12 +00:00
|
|
|
python-dateutil
|
2021-12-06 16:07:01 +00:00
|
|
|
pytz
|
|
|
|
requests
|
2022-06-16 17:23:12 +00:00
|
|
|
setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
six
|
|
|
|
xmlschema
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pyasn1
|
2022-08-12 12:06:08 +00:00
|
|
|
pymongo3
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-xmlsec1-path.patch;
|
|
|
|
inherit xmlsec;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# fix failing tests on systems with 32bit time_t
|
|
|
|
sed -i 's/2999\(-.*T\)/2029\1/g' tests/*.xml
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Disabled tests try to access the network
|
|
|
|
"test_load_extern_incommon"
|
|
|
|
"test_load_remote_encoding"
|
|
|
|
"test_load_external"
|
|
|
|
"test_conf_syslog"
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"saml2"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python implementation of SAML Version 2 Standard";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/IdentityPython/pysaml2";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|