From 182d23ab70118723045615943e15f81f27d0ba2a Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:12:38 -0700 Subject: [PATCH] radicale: fix tests for python 3.11 --- pkgs/servers/radicale/3.x.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/radicale/3.x.nix b/pkgs/servers/radicale/3.x.nix index 1827c30be984..3df1ae7c4d1d 100644 --- a/pkgs/servers/radicale/3.x.nix +++ b/pkgs/servers/radicale/3.x.nix @@ -1,4 +1,9 @@ -{ lib, python3, fetchFromGitHub, nixosTests }: +{ lib +, python3 +, fetchFromGitHub +, fetchpatch +, nixosTests +}: python3.pkgs.buildPythonApplication rec { pname = "radicale"; @@ -11,6 +16,15 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-V0nqgxGUxcTRAYFuxpKUEVB/g/Mbvw+9OIcvAexXwuM="; }; + patches = [ + # https://github.com/Kozea/Radicale/pull/1328 + (fetchpatch { + name = "fix-python3.11-tests.patch"; + url = "https://github.com/Kozea/Radicale/commit/110ec3a7885f523ce894a8c0e336c1a081dcd092.patch"; + hash = "sha256-WEiwzJ+Vzv8PXmZUi1X7Qzs+oE6qgmpvHqm/xiOMrt0="; + }) + ]; + postPatch = '' sed -i '/addopts/d' setup.cfg ''; @@ -23,6 +37,8 @@ python3.pkgs.buildPythonApplication rec { pytz # https://github.com/Kozea/Radicale/issues/816 ] ++ passlib.optional-dependencies.bcrypt; + __darwinAllowLocalNetworking = true; + nativeCheckInputs = with python3.pkgs; [ pytestCheckHook waitress