[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49210] [PATCH v1 15/16] gnu: Add pipe-viewer.
From: |
Raghav Gururajan |
Subject: |
[bug#49210] [PATCH v1 15/16] gnu: Add pipe-viewer. |
Date: |
Thu, 24 Jun 2021 10:45:55 -0400 |
* gnu/packages/video.scm (pipe-viewer): New variable.
---
gnu/packages/video.scm | 112 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index fbc468eab7..1bc2027a92 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -178,6 +178,7 @@
#:use-module (gnu packages vulkan)
#:use-module (gnu packages web)
#:use-module (gnu packages webkit)
+ #:use-module (gnu packages wget)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xiph)
@@ -1020,6 +1021,117 @@ H.264 (MPEG-4 AVC) video streams.")
(@command{mkvmerge}).")
(license license:gpl2)))
+(define-public pipe-viewer
+ (package
+ (name "pipe-viewer")
+ (version "0.1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/trizen/pipe-viewer")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1d2gfkd3nc0c4ah67250lqskkd85wpljrikw8a378ni398ngaq14"))))
+ (build-system perl-build-system)
+ (arguments
+ `(#:imported-modules
+ ((guix build copy-build-system)
+ ,@%perl-build-system-modules)
+ #:modules
+ (((guix build copy-build-system)
+ #:prefix copy:)
+ (guix build perl-build-system)
+ (guix build utils)
+ (srfi srfi-26))
+ #:module-build-flags
+ (list
+ "--gtk3")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "." "(.*viewer$|\\.pm$)")
+ (("'ffmpeg'")
+ (format #f "'~a/bin/ffmpeg'"
+ (assoc-ref inputs "ffmpeg")))
+ (("'mpv'")
+ (format #f "'~a/bin/mpv'"
+ (assoc-ref inputs "mpv")))
+ (("'wget'")
+ (format #f "'~a/bin/wget'"
+ (assoc-ref inputs "wget")))
+ (("'xdg-open'")
+ (format #f "'~a/bin/xdg-open'"
+ (assoc-ref inputs "xdg-utils")))
+ (("'youtube-dl'")
+ (format #f "'~a/bin/youtube-dl'"
+ (assoc-ref inputs "youtube-dl"))))))
+ (add-after 'install 'install-xdg
+ (lambda args
+ (apply (assoc-ref copy:%standard-phases 'install)
+ #:install-plan
+ '(("share/icons" "share/pixmaps")
+ ("share" "share/applications"
+ #:include-regexp ("\\.desktop$")))
+ args)))
+ (add-after 'install-xdg 'wrap-programs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin-dir (string-append out "/bin/"))
+ (site-dir (string-append out "/lib/perl5/site_perl/"))
+ (perl-lib (getenv "PERL5LIB"))
+ (gi-typelib (getenv "GI_TYPELIB_PATH")))
+ (for-each
+ (cut wrap-program <>
+ `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
+ (find-files bin-dir))))))))
+ (native-inputs
+ `(("module-build" ,perl-module-build)
+ ("test-pod" ,perl-test-pod)
+ ("test-simple" ,perl-test-simple)))
+ (inputs
+ `(("data-dump" ,perl-data-dump)
+ ("digest-md5" ,perl-digest-md5)
+ ("encode" ,perl-encode)
+ ("ffmpeg" ,ffmpeg)
+ ("file-path" ,perl-file-path)
+ ("file-sharedir" ,perl-file-sharedir)
+ ("getopt-long" ,perl-getopt-long)
+ ("gtk3" ,perl-gtk3)
+ ("http-message" ,perl-http-message)
+ ("json" ,perl-json)
+ ("json-xs" ,perl-json-xs)
+ ("libwww" ,perl-libwww)
+ ("lwp-protocol-https" ,perl-lwp-protocol-https)
+ ("lwp-useragent-cached" ,perl-lwp-useragent-cached)
+ ("memoize" ,perl-memoize)
+ ("mime-base64" ,perl-mime-base64)
+ ("mpv" ,mpv)
+ ("pathtools" ,perl-pathtools)
+ ("scalar-list-utils" ,perl-scalar-list-utils)
+ ("storable" ,perl-storable)
+ ("term-ansicolor" ,perl-term-ansicolor)
+ ("term-readline-gnu" ,perl-term-readline-gnu)
+ ("text-parsewords" ,perl-text-parsewords)
+ ("text-tabs+wrap" ,perl-text-tabs+wrap)
+ ("unicode-linebreak" ,perl-unicode-linebreak)
+ ("uri-escape" ,perl-uri-escape)
+ ("wget" ,wget)
+ ("xdg-utils" ,xdg-utils)
+ ("youtube-dl" ,youtube-dl)))
+ (propagated-inputs
+ `(("dconf" ,dconf)))
+ (home-page "https://github.com/trizen/pipe-viewer")
+ (synopsis "CLI+GUI YouTube Client")
+ (description "Pipe-Viewer is a lightweight application for searching and
+playing videos from YouTube. It parses the YouTube website directly and relies
+on the Invidious instances only as a fallback method.")
+ (license license:artistic2.0)))
+
(define-public straw-viewer
(package
(name "straw-viewer")
--
2.32.0
- [bug#49210] [PATCH v1 06/16] gnu: Add perl-gtk3., (continued)
- [bug#49210] [PATCH v1 06/16] gnu: Add perl-gtk3., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 10/16] gnu: Add perl-test-portability-files., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 11/16] gnu: Add perl-xsloader., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 05/16] gnu: Add perl-glib-object-introspection., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 07/16] gnu: Add perl-text-tabs+wrap., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 09/16] gnu: Add perl-term-ansicolor., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 12/16] gnu: Add perl-storable., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 13/16] gnu: Add perl-encode., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 16/16] gnu: straw-viewer: Deprecate package., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 14/16] gnu: Add perl-mime-base64., Raghav Gururajan, 2021/06/24
- [bug#49210] [PATCH v1 15/16] gnu: Add pipe-viewer.,
Raghav Gururajan <=
- [bug#49210] [PATCH v2 01/16] gnu: Add perl-exporter., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 03/16] gnu: perl-cairo: Propagate cairo., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 02/16] gnu: perl-glib: Propagate glib., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 05/16] gnu: Add perl-glib-object-introspection., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 04/16] gnu: Add perl-cairo-gobject., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 06/16] gnu: Add perl-gtk3., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 07/16] gnu: Add perl-text-tabs+wrap., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 08/16] gnu: Add perl-text-parsewords., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 09/16] gnu: Add perl-term-ansicolor., Raghav Gururajan, 2021/06/25
- [bug#49210] [PATCH v2 11/16] gnu: Add perl-xsloader., Raghav Gururajan, 2021/06/25