From 0764e60602baab5fe84c76e2115b7f92870521c2 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sat, 14 Jun 2025 23:01:45 +0100 Subject: [PATCH] gnu: thefuck: Improve package * gnu/packages/admin.scm (thefuck): Use G-expressions, simplify. [build-system]: Use pyproject. [inputs]: Add python-colorama, python-decorator, python-psutil, and python-pyte. [propagated-inputs]: Remove python-colorama, python-decorator, python-psutil, python-pyte, and python-six. [native-inputs]: Add python-setuptools and python-wheel. Change-Id: I02fe8b7fe12f16bfea89f2935f4f4f71dbd70bfc --- gnu/packages/admin.scm | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 362d0878aa8..fa468c13fcc 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -3946,26 +3946,31 @@ plug-in architecture to allow monitoring other system metrics.") (base32 "18ipa1bm6q1n5drbi8i65726hhqhl1g41390lfqrc11hkbvv443d")) (patches (search-patches "thefuck-test-environ.patch" "thefuck-remove-broken-tests.patch")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (delete 'check) - (add-after 'install 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Tests look for installed package - (add-installed-pythonpath inputs outputs) - ;; Some tests need write access to $HOME. - (setenv "HOME" "/tmp") - ;; Even with that, this function tries to mkdir /.config. - (substitute* "tests/test_utils.py" - (("settings\\.init\\(\\)") "")) - (invoke "py.test" "-v")))))) - (propagated-inputs - (list python-colorama python-decorator python-psutil python-pyte - python-six)) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + ;; Tests look for installed package + ;; Some tests need write access to $HOME. + (setenv "HOME" "/tmp") + ;; Even with that, this function tries to mkdir /.config. + (substitute* "tests/test_utils.py" + (("settings\\.init\\(\\)") ""))))))) (native-inputs - (list go python-mock python-pytest python-pytest-mock)) + (list go + python-mock + python-pytest + python-pytest-mock + python-setuptools + python-wheel)) + (inputs + (list python-colorama + python-decorator + python-psutil + python-pyte)) (home-page "https://github.com/nvbn/thefuck") (synopsis "Correct mistyped console command") (description