From 57fdac4a608db7af198d5b75f672375fcddf2073 Mon Sep 17 00:00:00 2001 From: dish Date: Sun, 24 Aug 2025 11:53:43 -0400 Subject: [PATCH] python3Packages.xvfbwrapper: fix build and enable tests --- .../python-modules/xvfbwrapper/default.nix | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/xvfbwrapper/default.nix b/pkgs/development/python-modules/xvfbwrapper/default.nix index 966e4f18b4be..357613c233d8 100644 --- a/pkgs/development/python-modules/xvfbwrapper/default.nix +++ b/pkgs/development/python-modules/xvfbwrapper/default.nix @@ -1,31 +1,37 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + setuptools, xorg, - mock, + pytestCheckHook, }: buildPythonPackage rec { pname = "xvfbwrapper"; version = "0.2.13"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-ouR2yaTxlzf+Ky0LgB5m8P9wH9oz2YakvzTdxBR1QQI="; + src = fetchFromGitHub { + owner = "cgoldberg"; + repo = "xvfbwrapper"; + tag = version; + sha256 = "sha256-8JO5NMRawqFmGEmjeVed8dd9b2JD/n547rM9fp7A8L8="; }; - propagatedBuildInputs = [ xorg.xvfb ]; - # See: https://github.com/cgoldberg/xvfbwrapper/issues/30 - doCheck = false; + build-system = [ setuptools ]; - nativeCheckInputs = [ mock ]; + dependencies = [ xorg.xvfb ]; - meta = with lib; { - description = "Run headless display inside X virtual framebuffer (Xvfb)"; + nativeCheckInputs = [ + pytestCheckHook + xorg.xvfb + ]; + + meta = { + description = "Run headless displays inside X virtual framebuffers (Xvfb)"; homepage = "https://github.com/cgoldberg/xvfbwrapper"; - license = licenses.mit; - maintainers = with maintainers; [ ashgillman ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ashgillman ]; }; }