From patchwork Thu Jun 24 14:45:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 30678 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4DCD027BC81; Thu, 24 Jun 2021 15:48:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CC5CE27BC78 for ; Thu, 24 Jun 2021 15:47:59 +0100 (BST) Received: from localhost ([::1]:54476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwQe6-0003yU-Sh for patchwork@mira.cbaines.net; Thu, 24 Jun 2021 10:47:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwQdI-0002pW-6B for guix-patches@gnu.org; Thu, 24 Jun 2021 10:47:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwQdH-0001bO-RK for guix-patches@gnu.org; Thu, 24 Jun 2021 10:47:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwQdH-0003o1-QJ for guix-patches@gnu.org; Thu, 24 Jun 2021 10:47:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49210] [PATCH v1 15/16] gnu: Add pipe-viewer. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Jun 2021 14:47:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49210 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 49210@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 49210-submit@debbugs.gnu.org id=B49210.162454598914467 (code B ref 49210); Thu, 24 Jun 2021 14:47:07 +0000 Received: (at 49210) by debbugs.gnu.org; 24 Jun 2021 14:46:29 +0000 Received: from localhost ([127.0.0.1]:43747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwQce-0003lC-TL for submit@debbugs.gnu.org; Thu, 24 Jun 2021 10:46:29 -0400 Received: from out0.migadu.com ([94.23.1.103]:56154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwQcN-0003jW-QU for 49210@debbugs.gnu.org; Thu, 24 Jun 2021 10:46:12 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1624545971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BSEC6o+ppKmPmz7K4mU3kq7cxrRHT7yl1BBPUdac4cw=; b=Idg3sDfXp5E6KjJOJkFyuGmctqfa3i15rKsq+trC2cSnMg1/GvCpo9oiDZZK4XeM7ie/PG FtfqK1DK5GSOfIbXq4onPDqyxgD+PstyafSLU3cbcAUexFV5tykoCN+YV3Gja6BV6efK9O Sr7QbrkHStQ1Az0rO0tnkeuhDXpS1fB6RZO7SAvSi/ZyRVvo768M9WvTOJUJSw1mV4XeFA 9BVcAq1pDMWxwvYlI2GiNiCK3p1ygwJUkPpnMPj5IdGNvGH92mM17lFow93J21T49wfW/C X2Tmeu4gz/pPgbdkQQSf0yyW1utQH+lJJZu92hRfiTDxy45nlpqg81pV0OkNlQ== Date: Thu, 24 Jun 2021 10:45:55 -0400 Message-Id: <20210624144556.9671-15-rg@raghavgururajan.name> In-Reply-To: <20210624144556.9671-1-rg@raghavgururajan.name> References: <20210624144556.9671-1-rg@raghavgururajan.name> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches * 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")