1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-24 10:01:47 +02:00

gnu: twitchy: Switch to pyproject.

* gnu/packages/video.scm (twitchy):
[build-system]: Switch to pyproject-build-system.
[arguments]<#:tests?>: Disable them.
<#:phases>: Improve style, use gepxs, remove trailing #t.
[native-inputs]: Add python-setuptools.

Change-Id: Iff9a112e9ce0f6a9c541780033523aadc53b9d2d
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves
2025-12-29 09:02:00 +01:00
committed by Sharlatan Hellseher
parent 4e0906e98c
commit 98be8e7f18
+24 -24
View File
@@ -3943,6 +3943,9 @@ and custom quantization matrices.")
from sites like Twitch.tv and pipes them into a video player of choice.")
(license license:bsd-2)))
;; XXX: This package has not been updated in 6 years, is related to an web
;; application and is not tested, it's most likely not working, but I haven't
;; tested it. Consider removal.
(define-public twitchy
(let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
(package
@@ -3956,31 +3959,28 @@ from sites like Twitch.tv and pipes them into a video player of choice.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
(build-system python-build-system)
(base32 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
(build-system pyproject-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "twitchy/twitchy_play.py"
(("\"streamlink ")
(string-append "\"" (assoc-ref inputs "streamlink")
"/bin/streamlink ")))
#t))
(add-before 'check 'check-setup
(lambda _
(setenv "HOME" (getcwd)) ;Needs to write to $HOME.
#t))
(add-after 'install 'install-rofi-plugin
(lambda* (#:key outputs #:allow-other-keys)
(install-file "plugins/rofi-twitchy"
(string-append (assoc-ref outputs "out")
"/bin"))
#t)))))
(inputs
(list python-requests streamlink))
(list
#:tests? #f ; No tests.
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "twitchy/twitchy_play.py"
(("\"streamlink ")
(format #f "\"~a "
(search-input-file inputs "/bin/streamlink"))))))
(add-before 'check 'check-setup
(lambda _
(setenv "HOME" (getcwd)))) ;Needs to write to $HOME.
(add-after 'install 'install-rofi-plugin
(lambda _
(install-file "plugins/rofi-twitchy"
(string-append #$output "/bin")))))))
(native-inputs (list python-setuptools))
(inputs (list python-requests streamlink))
(home-page "https://github.com/BasioMeusPuga/twitchy")
(synopsis "Command-line interface for Twitch.tv")
(description