2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchFromGitHub
|
|
|
|
, substituteAll
|
|
|
|
, xmlsec
|
2021-07-04 02:40:35 +00:00
|
|
|
, cryptography, defusedxml, pyopenssl, python-dateutil, pytz, requests, six
|
2021-02-05 17:12:51 +00:00
|
|
|
, mock, pyasn1, pymongo, pytest, responses, xmlschema, importlib-resources
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysaml2";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "6.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
# No tests in PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "IdentityPython";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1p0i88v2ng9fzs0fzjam1dc1idnihqc1wgagvnavqjrih721qcpi";
|
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-02-05 17:12:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2021-02-05 17:12:51 +00:00
|
|
|
defusedxml
|
|
|
|
importlib-resources
|
|
|
|
pyopenssl
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
xmlschema
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ mock pyasn1 pymongo pytest responses ];
|
|
|
|
|
|
|
|
# Disabled tests try to access the network
|
|
|
|
checkPhase = ''
|
|
|
|
py.test -k "not test_load_extern_incommon \
|
|
|
|
and not test_load_remote_encoding \
|
2020-11-30 08:33:03 +00:00
|
|
|
and not test_load_external \
|
|
|
|
and not test_conf_syslog"
|
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
|
|
|
homepage = "https://github.com/rohe/pysaml2";
|
|
|
|
description = "Python implementation of SAML Version 2 Standard";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|