diff --git a/pkgs/development/python-modules/pysaml2/default.nix b/pkgs/development/python-modules/pysaml2/default.nix index 3cd65c271e9a..b8ace412614c 100644 --- a/pkgs/development/python-modules/pysaml2/default.nix +++ b/pkgs/development/python-modules/pysaml2/default.nix @@ -3,7 +3,6 @@ , cryptography , defusedxml , fetchFromGitHub -, fetchPypi , importlib-resources , poetry-core , pyasn1 @@ -21,18 +20,9 @@ , xmlsec }: -let - pymongo3 = pymongo.overridePythonAttrs(old: rec { - version = "3.12.3"; - src = fetchPypi { - pname = "pymongo"; - inherit version; - hash = "sha256-ConK3ABipeU2ZN3gQ/bAlxcrjBxfAJRJAJUoL/mZWl8="; - }; - }); -in buildPythonPackage rec { +buildPythonPackage rec { pname = "pysaml2"; - version = "7.4.1"; + version = "7.4.2"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -40,10 +30,22 @@ in buildPythonPackage rec { src = fetchFromGitHub { owner = "IdentityPython"; repo = pname; - rev = "v${version}"; - hash = "sha256-QHAbm6u5oH3O7MEVFE+sW98raquv89KJ8gonk3Yyu/0="; + rev = "refs/tags/v${version}"; + hash = "sha256-f8qd1Mfy32CYH9/PshfMMBviDg7OhOPlwz69bPjlYbg="; }; + 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 + ''; + nativeBuildInputs = [ poetry-core ]; @@ -63,23 +65,11 @@ in buildPythonPackage rec { nativeCheckInputs = [ pyasn1 - pymongo3 + 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" @@ -95,6 +85,7 @@ in buildPythonPackage rec { meta = with lib; { description = "Python implementation of SAML Version 2 Standard"; homepage = "https://github.com/IdentityPython/pysaml2"; + changelog = "https://github.com/IdentityPython/pysaml2/blob/v${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ ]; };