diff --git a/pkgs/development/python-modules/mozilla-django-oidc/cryptography.patch b/pkgs/development/python-modules/mozilla-django-oidc/cryptography.patch deleted file mode 100644 index 2217168cc026..000000000000 --- a/pkgs/development/python-modules/mozilla-django-oidc/cryptography.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tests/test_auth.py -+++ b/tests/test_auth.py -@@ -1234,7 +1234,7 @@ class OIDCAuthenticationBackendES256WithJwksEndpointTestCase(TestCase): - self.backend = OIDCAuthenticationBackend() - - # Generate a private key to create a test token with -- private_key = ec.generate_private_key(ec.SECP256R1, default_backend()) -+ private_key = ec.generate_private_key(ec.SECP256R1(), default_backend()) - private_key_pem = private_key.private_bytes( - serialization.Encoding.PEM, - serialization.PrivateFormat.PKCS8, diff --git a/pkgs/development/python-modules/mozilla-django-oidc/default.nix b/pkgs/development/python-modules/mozilla-django-oidc/default.nix index d3eb5ead33d9..d2ef30891c07 100644 --- a/pkgs/development/python-modules/mozilla-django-oidc/default.nix +++ b/pkgs/development/python-modules/mozilla-django-oidc/default.nix @@ -5,31 +5,32 @@ setuptools, djangorestframework, django, - josepy, + pyjwt, requests, cryptography, }: buildPythonPackage rec { pname = "mozilla-django-oidc"; - version = "4.0.1"; + version = "5.0.2"; pyproject = true; src = fetchFromGitHub { owner = "mozilla"; repo = "mozilla-django-oidc"; - rev = version; - hash = "sha256-72F1aLLIId+YClTrpOz3bL8LSq6ZhZjjtv8V/GJGkqs="; + tag = version; + hash = "sha256-5J2lzGGdjoXzdzfKdmfUaSM7KQ6Hn7KerBtoKzFsZfY="; }; - # Fix test with latest cryptography - # Upstream PR: https://github.com/mozilla/mozilla-django-oidc/pull/556 - patches = [ - ./cryptography.patch + build-system = [ + setuptools ]; - nativeBuildInputs = [ - setuptools + dependencies = [ + django + pyjwt + requests + cryptography ]; nativeCheckInputs = [ @@ -44,17 +45,10 @@ buildPythonPackage rec { runHook postCheck ''; - dependencies = [ - django - josepy - requests - cryptography - ]; - meta = { description = "Django OpenID Connect library"; homepage = "https://github.com/mozilla/mozilla-django-oidc"; - changelog = "https://github.com/mozilla/mozilla-django-oidc/releases/tag/${src.rev}"; + changelog = "https://github.com/mozilla/mozilla-django-oidc/releases/tag/${src.tag}"; license = lib.licenses.mpl20; maintainers = with lib.maintainers; [ felbinger ]; };