From bca32d6c045e9fc66a052163b81376bb7eb71f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Neumann?= Date: Tue, 10 Feb 2026 10:23:57 +0100 Subject: [PATCH] unpaper: enable tests --- pkgs/by-name/un/unpaper/package.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/by-name/un/unpaper/package.nix b/pkgs/by-name/un/unpaper/package.nix index ce818f072032..0d1702934743 100644 --- a/pkgs/by-name/un/unpaper/package.nix +++ b/pkgs/by-name/un/unpaper/package.nix @@ -17,6 +17,7 @@ # tests nixosTests, + python3Packages, }: stdenv.mkDerivation (finalAttrs: { @@ -45,6 +46,21 @@ stdenv.mkDerivation (finalAttrs: { ffmpeg-headless ]; + nativeCheckInputs = with python3Packages; [ + pytest + pytest-xdist + pillow + ]; + + doCheck = true; + + # Tests take quite a long time + # Using pytest-xdist, we launch multiple workers + # Restrict to max 6 to avoid having a large number of idlers + preCheck = '' + mesonCheckFlagsArray+=(--test-args "--numprocesses=auto --maxprocesses=6") + ''; + passthru.tests = { inherit (nixosTests) paperless; };