From e9277a608419835c58c32452d4126667d73a1adc Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 17:54:24 -0400 Subject: [PATCH] python312Packages.fabulous: Fix tests on python 3.12 --- .../python-modules/fabulous/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/fabulous/default.nix b/pkgs/development/python-modules/fabulous/default.nix index 075f01ee64061..d94227989c490 100644 --- a/pkgs/development/python-modules/fabulous/default.nix +++ b/pkgs/development/python-modules/fabulous/default.nix @@ -2,14 +2,16 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch2, pillow, + setuptools, python, }: buildPythonPackage rec { pname = "fabulous"; version = "0.4.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "jart"; @@ -18,9 +20,18 @@ buildPythonPackage rec { hash = "sha256-hchlxuB5QP+VxCx+QZ2739/mR5SQmYyE+9kXLKJ2ij4="; }; - patches = [ ./relative_import.patch ]; + patches = [ + ./relative_import.patch + # https://github.com/jart/fabulous/pull/22 + (fetchpatch2 { + url = "https://github.com/jart/fabulous/commit/5779f2dfbc88fd81b5b5865247913d4775e67959.patch?full_index=1"; + hash = "sha256-miWFt4vDpwWhSUgnWDjWUXoibijcDa1c1dDOSkfWoUg="; + }) + ]; - propagatedBuildInputs = [ pillow ]; + build-system = [ setuptools ]; + + dependencies = [ pillow ]; checkPhase = '' for i in tests/*.py; do @@ -28,10 +39,10 @@ buildPythonPackage rec { done ''; - meta = with lib; { + meta = { description = "Make the output of terminal applications look fabulous"; homepage = "https://jart.github.io/fabulous"; - license = licenses.asl20; - maintainers = [ maintainers.symphorien ]; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.symphorien ]; }; }