uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
90
pkgs/development/python-modules/pysaml2/default.nix
Normal file
90
pkgs/development/python-modules/pysaml2/default.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, cryptography
|
||||
, defusedxml
|
||||
, fetchFromGitHub
|
||||
, importlib-resources
|
||||
, mock
|
||||
, pyasn1
|
||||
, pymongo
|
||||
, pyopenssl
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, pytz
|
||||
, requests
|
||||
, responses
|
||||
, setuptools
|
||||
, six
|
||||
, substituteAll
|
||||
, xmlschema
|
||||
, xmlsec
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pysaml2";
|
||||
version = "7.1.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "IdentityPython";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nyQcQ1OO9PuuQROg+km2vIRF1sZ22MZhiHpmVXWl+is=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cryptography
|
||||
defusedxml
|
||||
pyopenssl
|
||||
python-dateutil
|
||||
pytz
|
||||
requests
|
||||
setuptools
|
||||
six
|
||||
xmlschema
|
||||
] ++ lib.optionals (pythonOlder "3.9") [
|
||||
importlib-resources
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
mock
|
||||
pyasn1
|
||||
pymongo
|
||||
pytestCheckHook
|
||||
responses
|
||||
];
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# Disabled tests try to access the network
|
||||
"test_load_extern_incommon"
|
||||
"test_load_remote_encoding"
|
||||
"test_load_external"
|
||||
"test_conf_syslog"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"saml2"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python implementation of SAML Version 2 Standard";
|
||||
homepage = "https://github.com/IdentityPython/pysaml2";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
diff --git a/src/saml2/sigver.py b/src/saml2/sigver.py
|
||||
index 59fe2dee..0c24fbcc 100644
|
||||
--- a/src/saml2/sigver.py
|
||||
+++ b/src/saml2/sigver.py
|
||||
@@ -165,33 +165,7 @@ def get_xmlsec_binary(paths=None):
|
||||
:return: full name of the xmlsec1 binary found. If no binaries are
|
||||
found then an exception is raised.
|
||||
"""
|
||||
- if os.name == 'posix':
|
||||
- bin_name = ['xmlsec1']
|
||||
- elif os.name == 'nt':
|
||||
- bin_name = ['xmlsec.exe', 'xmlsec1.exe']
|
||||
- else: # Default !?
|
||||
- bin_name = ['xmlsec1']
|
||||
-
|
||||
- if paths:
|
||||
- for bname in bin_name:
|
||||
- for path in paths:
|
||||
- fil = os.path.join(path, bname)
|
||||
- try:
|
||||
- if os.lstat(fil):
|
||||
- return fil
|
||||
- except OSError:
|
||||
- pass
|
||||
-
|
||||
- for path in os.environ['PATH'].split(os.pathsep):
|
||||
- for bname in bin_name:
|
||||
- fil = os.path.join(path, bname)
|
||||
- try:
|
||||
- if os.lstat(fil):
|
||||
- return fil
|
||||
- except OSError:
|
||||
- pass
|
||||
-
|
||||
- raise SigverError('Cannot find {binary}'.format(binary=bin_name))
|
||||
+ return '@xmlsec@/bin/xmlsec1'
|
||||
|
||||
|
||||
def _get_xmlsec_cryptobackend(path=None, search_paths=None):
|
||||
Loading…
Add table
Add a link
Reference in a new issue