From patchwork Sun Jul 4 01:03:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 31122 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 F2ADE27BC81; Sun, 4 Jul 2021 02:04:57 +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 6F71627BC78 for ; Sun, 4 Jul 2021 02:04:57 +0100 (BST) Received: from localhost ([::1]:53194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzqZ6-00060B-Im for patchwork@mira.cbaines.net; Sat, 03 Jul 2021 21:04:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzqYK-00043j-86 for guix-patches@gnu.org; Sat, 03 Jul 2021 21:04:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzqYJ-0004y4-So for guix-patches@gnu.org; Sat, 03 Jul 2021 21:04:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lzqYJ-0006Hx-Q0 for guix-patches@gnu.org; Sat, 03 Jul 2021 21:04:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49210] [PATCH v5 15/16] gnu: Add pipe-viewer. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Jul 2021 01:04: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.162536062224037 (code B ref 49210); Sun, 04 Jul 2021 01:04:07 +0000 Received: (at 49210) by debbugs.gnu.org; 4 Jul 2021 01:03:42 +0000 Received: from localhost ([127.0.0.1]:40179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzqXu-0006FX-AA for submit@debbugs.gnu.org; Sat, 03 Jul 2021 21:03:42 -0400 Received: from out0.migadu.com ([94.23.1.103]:58452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzqXo-0006EA-Pp for 49210@debbugs.gnu.org; Sat, 03 Jul 2021 21:03:37 -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=1625360616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4RTBsIueVDz1Blu9qB/i7n3aVDUiI/jCOnSPVfqUF9Q=; b=PaZoLgv8pbFJmEYoCNUVmrnJbh+zhkkEz7sUQfI7CTlAI/+qM/kkCU9ahmVJTYT/8C216m Z2Zz2iikET8i2f4oWTy70e3FT2JXCv6DHX49uOPjllM8ins5IvYHmiWZ4tHAJvCmAR42gf OJtwE+EtsVsRXfdczTHvRtQWT/ROBRUFncuP773hoZy9AfLhUiqVcsfY5wAMuSnH6qY4ga zi8TsSpPnGPjU0g/YbW7T6dchK6aMFwVwwdoi+IUU3tqK/d5NCT85NRXbM0A4nSuawl3ii iYbhs6yCl0wic9Ds/uQ91gAZboYxH7DyEbF7jsqnrhMjMou96OAKkXTqWexSmg== Date: Sat, 3 Jul 2021 21:03:19 -0400 Message-Id: <20210704010320.5458-15-rg@raghavgururajan.name> In-Reply-To: <20210704010320.5458-1-rg@raghavgururajan.name> References: <20210704010320.5458-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 | 109 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 74c8d3b253..f2c4335079 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -52,6 +52,7 @@ ;;; Copyright © 2021 David Wilson ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2020 Hartmut Goebel +;;; Copyright © 2021 Raghav Gururajan ;;; ;;; This file is part of GNU Guix. ;;; @@ -179,6 +180,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) @@ -1021,6 +1023,113 @@ 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$") + (("'ffmpeg'") + (format #f "'~a/bin/ffmpeg'" + (assoc-ref inputs "ffmpeg"))) + (("'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 + `(("perl-module-build" ,perl-module-build) + ("perl-test-pod" ,perl-test-pod) + ("perl-test-simple" ,perl-test-simple))) + (inputs + `(("perl-data-dump" ,perl-data-dump) + ("perl-digest-md5" ,perl-digest-md5) + ("perl-encode" ,perl-encode) + ("ffmpeg" ,ffmpeg) + ("perl-file-path" ,perl-file-path) + ("perl-file-sharedir" ,perl-file-sharedir) + ("perl-getopt-long" ,perl-getopt-long) + ("perl-gtk3" ,perl-gtk3) + ("perl-http-message" ,perl-http-message) + ("perl-json" ,perl-json) + ("perl-json-xs" ,perl-json-xs) + ("perl-libwww" ,perl-libwww) + ("perl-lwp-protocol-https" ,perl-lwp-protocol-https) + ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached) + ("perl-memoize" ,perl-memoize) + ("perl-mime-base64" ,perl-mime-base64) + ("perl-pathtools" ,perl-pathtools) + ("perl-scalar-list-utils" ,perl-scalar-list-utils) + ("perl-storable" ,perl-storable) + ("perl-term-ansicolor" ,perl-term-ansicolor) + ("perl-term-readline-gnu" ,perl-term-readline-gnu) + ("perl-text-parsewords" ,perl-text-parsewords) + ("perl-text-tabs+wrap" ,perl-text-tabs+wrap) + ("perl-unicode-linebreak" ,perl-unicode-linebreak) + ("perl-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")