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
This commit is contained in:
Sharlatan Hellseher 2025-06-14 23:01:45 +01:00
parent f0c09f8739
commit 0764e60602
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -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