From 8a3c8eed755214a4f3c1432fd6f0fa97408ef807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 23 Apr 2021 14:44:17 +0200 Subject: [PATCH 1/2] radicale: use pytestCheckHook --- pkgs/servers/radicale/3.x.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/servers/radicale/3.x.nix b/pkgs/servers/radicale/3.x.nix index bd781d869e9..594cd1712ea 100644 --- a/pkgs/servers/radicale/3.x.nix +++ b/pkgs/servers/radicale/3.x.nix @@ -1,14 +1,20 @@ -{ lib, python3 }: +{ lib, python3, fetchFromGitHub }: python3.pkgs.buildPythonApplication rec { - pname = "Radicale"; + pname = "radicale"; version = "3.0.6"; - src = python3.pkgs.fetchPypi { - inherit pname version; - sha256 = "a9433d3df97135d9c02cec8dde4199444daf1b73ad161ded398d67b8e629fdc6"; + src = fetchFromGitHub { + owner = "Kozea"; + repo = "Radicale"; + rev = version; + sha256 = "1xlsvrmx6jhi71j6j8z9sli5vwxasivzjyqf8zq8r0l5p7350clf"; }; + postPatch = '' + sed -i '/addopts/d' setup.cfg + ''; + propagatedBuildInputs = with python3.pkgs; [ defusedxml passlib @@ -18,11 +24,7 @@ python3.pkgs.buildPythonApplication rec { ]; checkInputs = with python3.pkgs; [ - pytestrunner - pytest - pytestcov - pytest-flake8 - pytest-isort + pytestCheckHook waitress ]; From f2ab38587429211d065979139f10160ee537e333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 23 Apr 2021 15:13:36 +0200 Subject: [PATCH 2/2] radicale: add passthru.tests --- pkgs/servers/radicale/3.x.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/radicale/3.x.nix b/pkgs/servers/radicale/3.x.nix index 594cd1712ea..25f4d4b69c0 100644 --- a/pkgs/servers/radicale/3.x.nix +++ b/pkgs/servers/radicale/3.x.nix @@ -1,4 +1,4 @@ -{ lib, python3, fetchFromGitHub }: +{ lib, python3, fetchFromGitHub, nixosTests }: python3.pkgs.buildPythonApplication rec { pname = "radicale"; @@ -28,6 +28,10 @@ python3.pkgs.buildPythonApplication rec { waitress ]; + passthru.tests = { + inherit (nixosTests) radicale; + }; + meta = with lib; { homepage = "https://www.radicale.org/3.0.html"; description = "CalDAV and CardDAV server";