2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2018-10-25 22:04:53 -04:00
|
|
|
, buildPythonPackage
|
2021-11-22 17:10:35 +01:00
|
|
|
, cryptography
|
|
|
|
, defusedxml
|
2021-11-22 17:15:52 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-resources
|
2021-11-22 17:10:35 +01:00
|
|
|
, mock
|
|
|
|
, pyasn1
|
|
|
|
, pymongo
|
2021-11-22 17:15:52 +01:00
|
|
|
, pyopenssl
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
2021-11-22 17:10:35 +01:00
|
|
|
, responses
|
2021-11-22 17:15:52 +01:00
|
|
|
, six
|
|
|
|
, substituteAll
|
2021-11-22 17:10:35 +01:00
|
|
|
, xmlschema
|
2021-11-22 17:15:52 +01:00
|
|
|
, xmlsec
|
2018-10-25 22:04:53 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysaml2";
|
2022-02-23 08:14:28 +00:00
|
|
|
version = "7.1.1";
|
2021-11-22 17:10:35 +01:00
|
|
|
format = "setuptools";
|
2020-02-09 22:14:01 +00:00
|
|
|
|
2021-11-22 17:10:35 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2019-01-11 11:16:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "IdentityPython";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-23 08:14:28 +00:00
|
|
|
sha256 = "sha256-uRfcn3nCK+tx6ol6ZFarOSrDOh0cfC9gZXBZ7EICQzw=";
|
2018-10-25 22:04:53 -04:00
|
|
|
};
|
|
|
|
|
2021-01-31 21:05:14 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
2021-07-03 13:37:24 +02:00
|
|
|
python-dateutil
|
2021-01-31 21:05:14 +00:00
|
|
|
defusedxml
|
|
|
|
pyopenssl
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
xmlschema
|
2021-11-22 17:10:35 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
2021-01-31 21:05:14 +00:00
|
|
|
];
|
2018-10-25 22:04:53 -04:00
|
|
|
|
2021-11-22 17:10:35 +01:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pyasn1
|
|
|
|
pymongo
|
2021-11-22 17:15:52 +01:00
|
|
|
pytestCheckHook
|
2021-11-22 17:10:35 +01:00
|
|
|
responses
|
|
|
|
];
|
2018-10-25 22:04:53 -04:00
|
|
|
|
2021-11-22 17:15:52 +01: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
|
2019-01-11 11:16:36 +01:00
|
|
|
'';
|
2018-10-25 22:04:53 -04:00
|
|
|
|
2021-11-22 17:15:52 +01:00
|
|
|
disabledTests = [
|
|
|
|
# Disabled tests try to access the network
|
|
|
|
"test_load_extern_incommon"
|
|
|
|
"test_load_remote_encoding"
|
|
|
|
"test_load_external"
|
|
|
|
"test_conf_syslog"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"saml2"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-25 22:04:53 -04:00
|
|
|
description = "Python implementation of SAML Version 2 Standard";
|
2021-11-22 17:10:35 +01:00
|
|
|
homepage = "https://github.com/IdentityPython/pysaml2";
|
2018-10-25 22:04:53 -04:00
|
|
|
license = licenses.asl20;
|
2021-11-22 17:10:35 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-10-25 22:04:53 -04:00
|
|
|
};
|
|
|
|
}
|