* [bug#30598] [PATCH 1/5] gnu: Add perl-cairo.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
@ 2018-02-24 23:30 ` Alex Vong
2018-02-24 23:31 ` [bug#30598] [PATCH 2/5] gnu: Add perl-glib Alex Vong
` (9 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-24 23:30 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Attachment #1.1: 0001-gnu-Add-perl-cairo.patch --]
[-- Type: text/x-diff, Size: 2447 bytes --]
From 3099c40fff2441df1451b16665839c8cf92cf75b Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:48:47 +0800
Subject: [PATCH 1/5] gnu: Add perl-cairo.
* gnu/packages/perl.scm (perl-cairo): New public variable.
---
gnu/packages/perl.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index cef42847c..c9de36a45 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,6 +46,7 @@
#:use-module (guix build-system perl)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-web)
#:use-module (gnu packages pkg-config))
@@ -680,6 +682,31 @@ processes can safely access the cache at the same time. It uses a basic LRU
algorithm to keep the most used entries in the cache.")
(license (package-license perl))))
+(define-public perl-cairo
+ (package
+ (name "perl-cairo")
+ (version "1.106")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1i25kks408c54k2zxskvg54l5k3qadzm8n72ffga9jy7ic0h6j76"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("cairo" ,cairo)))
+ (home-page "http://search.cpan.org/dist/Cairo/")
+ (synopsis "Perl interface to the cairo 2d vector graphics library")
+ (description "Cairo provides Perl bindings for the vector graphics library
+cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
+produces identical output on all those targets.")
+ (license lgpl2.1+)))
+
(define-public perl-capture-tiny
(package
(name "perl-capture-tiny")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 2/5] gnu: Add perl-glib.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
2018-02-24 23:30 ` [bug#30598] [PATCH 1/5] gnu: Add perl-cairo Alex Vong
@ 2018-02-24 23:31 ` Alex Vong
2018-02-24 23:32 ` [bug#30598] [PATCH 3/5] gnu: Add perl-pango Alex Vong
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-24 23:31 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0002-gnu-Add-perl-glib.patch --]
[-- Type: text/x-diff, Size: 2255 bytes --]
From 34eca4250f6cd4e4ce7e7c5850f25bbb7f6ab9f7 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:49:54 +0800
Subject: [PATCH 2/5] gnu: Add perl-glib.
* gnu/packages/perl.scm (perl-glib): New public variable.
---
gnu/packages/perl.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index c9de36a45..628019986 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -46,6 +46,7 @@
#:use-module (guix build-system perl)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-web)
@@ -3794,6 +3795,33 @@ vaguely inspired by John Ousterhout's Tk_ParseArgv.")
"Getopt-Tabular-" version))
(license (package-license perl))))
+(define-public perl-glib
+ (package
+ (name "perl-glib")
+ (version "1.326")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0prn9kkdpwjq9qmzqashbhk3pq4gvlrmvm3b10xf1dhc48406382"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("glib" ,glib)))
+ (home-page "http://search.cpan.org/dist/Glib/")
+ (synopsis "Perl wrappers for the GLib utility and Object libraries")
+ (description "This module provides perl access to GLib and GLib's GObject
+libraries. GLib is a portability and utility library; GObject provides a
+generic type system with inheritance and a powerful signal system. Together
+these libraries are used as the foundation for many of the libraries that make
+up the Gnome environment, and are used in many unrelated projects.")
+ (license lgpl2.1+)))
+
(define-public perl-graph
(package
(name "perl-graph")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 3/5] gnu: Add perl-pango.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
2018-02-24 23:30 ` [bug#30598] [PATCH 1/5] gnu: Add perl-cairo Alex Vong
2018-02-24 23:31 ` [bug#30598] [PATCH 2/5] gnu: Add perl-glib Alex Vong
@ 2018-02-24 23:32 ` Alex Vong
2018-02-24 23:33 ` [bug#30598] [PATCH 4/5] gnu: Add perl-gtk2 Alex Vong
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-24 23:32 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0003-gnu-Add-perl-pango.patch --]
[-- Type: text/x-diff, Size: 2527 bytes --]
From 6f47089ff55964fd4129ac91af651ffca7fb79ea Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:51:43 +0800
Subject: [PATCH 3/5] gnu: Add perl-pango.
* gnu/packages/perl.scm (perl-pango): New public variable.
---
gnu/packages/perl.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 628019986..9ec581abf 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -6469,6 +6469,43 @@ show those variables which are in scope at the point of the call. PadWalker
is particularly useful for debugging.")
(license (package-license perl))))
+(define-public perl-pango
+ (package
+ (name "perl-pango")
+ (version "1.227")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("pango" ,pango)))
+ (propagated-inputs
+ `(("perl-cairo" ,perl-cairo)
+ ("perl-glib" ,perl-glib)))
+ (home-page "http://search.cpan.org/dist/Pango/")
+ (synopsis "Layout and render international text")
+ (description "Pango is a library for laying out and rendering text, with an
+emphasis on internationalization. Pango can be used anywhere that text layout
+is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
+complete solution with high quality text handling and graphics rendering.
+
+Dynamically loaded modules handle text layout for particular combinations of
+script and font backend. Pango provides a wide selection of modules, including
+modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
+Virtually all of the world's major scripts are supported.
+
+In addition to the low level layout rendering routines, Pango includes
+@code{Pango::Layout}, a high level driver for laying out entire blocks of text,
+and routines to assist in editing internationalized text.")
+ (license lgpl2.1+)))
+
(define-public perl-parallel-forkmanager
(package
(name "perl-parallel-forkmanager")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 4/5] gnu: Add perl-gtk2.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (2 preceding siblings ...)
2018-02-24 23:32 ` [bug#30598] [PATCH 3/5] gnu: Add perl-pango Alex Vong
@ 2018-02-24 23:33 ` Alex Vong
2018-02-24 23:33 ` [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer Alex Vong
` (6 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-24 23:33 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0004-gnu-Add-perl-gtk2.patch --]
[-- Type: text/x-diff, Size: 1910 bytes --]
From 8e946345fa5948e4990dfc84d2b5a7defb7f24e7 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:51:09 +0800
Subject: [PATCH 4/5] gnu: Add perl-gtk2.
* gnu/packages/perl.scm (perl-gtk2): New public variable.
---
gnu/packages/perl.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 9ec581abf..7dfd21009 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -3843,6 +3843,33 @@ up the Gnome environment, and are used in many unrelated projects.")
the abstract data structures.")
(license (package-license perl))))
+(define-public perl-gtk2
+ (package
+ (name "perl-gtk2")
+ (version "1.24992")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1044rj3wbfmgaif2jb0k28m2aczli6ai2n5yvn6pr7zjyw16kvd2"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("gtk+" ,gtk+-2)))
+ (propagated-inputs
+ `(("perl-pango" ,perl-pango)))
+ (home-page "http://search.cpan.org/dist/Gtk2/")
+ (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
+ (description "Perl bindings to the 2.x series of the Gtk+ widget set.
+This module allows you to write graphical user interfaces in a Perlish and
+object-oriented way, freeing you from the casting and memory management in C,
+yet remaining very close in spirit to original API.")
+ (license lgpl2.1+)))
+
(define-public perl-guard
(package
(name "perl-guard")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (3 preceding siblings ...)
2018-02-24 23:33 ` [bug#30598] [PATCH 4/5] gnu: Add perl-gtk2 Alex Vong
@ 2018-02-24 23:33 ` Alex Vong
2018-02-26 0:58 ` Marius Bakke
2018-02-26 1:03 ` [bug#30598] [PATCH 0/5] " Marius Bakke
` (5 subsequent siblings)
10 siblings, 1 reply; 15+ messages in thread
From: Alex Vong @ 2018-02-24 23:33 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0005-gnu-Add-youtube-viewer.patch --]
[-- Type: text/x-diff, Size: 2826 bytes --]
From c6106691811adea6d71cf1837d9278f76e14af00 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:52:10 +0800
Subject: [PATCH 5/5] gnu: Add youtube-viewer.
* gnu/packages/video.scm (youtube-viewer): New public variable.
---
gnu/packages/video.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bf7a3960d..c87f2fbfb 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -53,6 +53,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system waf)
#:use-module (gnu packages)
@@ -1311,6 +1312,45 @@ audio, images) from the Web. It can use either mpv or vlc for playback.")
(home-page "https://you-get.org/")
(license license:expat)))
+(define-public youtube-viewer
+ (package
+ (name "youtube-viewer")
+ (version "3.3.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/trizen/youtube-viewer/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1j572his6qmazlmyrbnfq62s9bqml875ay7wy26byy9hfc7m0vgk"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-build" ,perl-module-build)))
+ ;;; FIXME: Add optional dependencies once available.
+ (propagated-inputs
+ `(("perl-data-dump" ,perl-data-dump)
+ ("perl-file-sharedir" ,perl-file-sharedir)
+ ("perl-gtk2" ,perl-gtk2)
+ ("perl-json" ,perl-json)
+ ("perl-libwww" ,perl-libwww)
+ ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
+ ("perl-mozilla-ca" ,perl-mozilla-ca)
+ ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
+ (arguments
+ `(#:module-build-flags '("--gtk")))
+ (synopsis
+ "Lightweight application for searching and streaming videos from YouTube")
+ (description
+ "Youtube-viewer searches and plays YouTube videos in a native player.
+It comes with various search options; it can search for videos, playlists
+and/or channels. The videos are streamed directly in a selected video player
+at the best resolution (customizable) and with closed-captions (if available).
+Both command-line and GTK2 interface are available.")
+ (home-page "https://github.com/trizen/youtube-viewer")
+ (license license:perl-license)))
+
(define-public libbluray
(package
(name "libbluray")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer.
2018-02-24 23:33 ` [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer Alex Vong
@ 2018-02-26 0:58 ` Marius Bakke
0 siblings, 0 replies; 15+ messages in thread
From: Marius Bakke @ 2018-02-26 0:58 UTC (permalink / raw)
To: Alex Vong, 30598
[-- Attachment #1: Type: text/plain, Size: 3294 bytes --]
Alex Vong <alexvong1995@gmail.com> writes:
> From c6106691811adea6d71cf1837d9278f76e14af00 Mon Sep 17 00:00:00 2001
> From: Alex Vong <alexvong1995@gmail.com>
> Date: Sun, 25 Feb 2018 06:52:10 +0800
> Subject: [PATCH 5/5] gnu: Add youtube-viewer.
>
> * gnu/packages/video.scm (youtube-viewer): New public variable.
> ---
> gnu/packages/video.scm | 40 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index bf7a3960d..c87f2fbfb 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -53,6 +53,7 @@
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system glib-or-gtk)
> #:use-module (guix build-system meson)
> + #:use-module (guix build-system perl)
> #:use-module (guix build-system python)
> #:use-module (guix build-system waf)
> #:use-module (gnu packages)
> @@ -1311,6 +1312,45 @@ audio, images) from the Web. It can use either mpv or vlc for playback.")
> (home-page "https://you-get.org/")
> (license license:expat)))
>
> +(define-public youtube-viewer
> + (package
> + (name "youtube-viewer")
> + (version "3.3.3")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/trizen/youtube-viewer/archive/"
> + version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "1j572his6qmazlmyrbnfq62s9bqml875ay7wy26byy9hfc7m0vgk"))))
> + (build-system perl-build-system)
> + (native-inputs
> + `(("perl-module-build" ,perl-module-build)))
> + ;;; FIXME: Add optional dependencies once available.
Which dependencies are those? :-)
Also, only two semicolons for normal comments.
> + (propagated-inputs
> + `(("perl-data-dump" ,perl-data-dump)
> + ("perl-file-sharedir" ,perl-file-sharedir)
> + ("perl-gtk2" ,perl-gtk2)
> + ("perl-json" ,perl-json)
> + ("perl-libwww" ,perl-libwww)
> + ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
> + ("perl-mozilla-ca" ,perl-mozilla-ca)
> + ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
I haven't built this yet, but assuming it's a single executable, could
you try to wrap it with the PERL5LIB variable? That way we don't have
to propagate all of these in end user profiles.
> + (arguments
> + `(#:module-build-flags '("--gtk")))
> + (synopsis
> + "Lightweight application for searching and streaming videos from YouTube")
> + (description
> + "Youtube-viewer searches and plays YouTube videos in a native player.
> +It comes with various search options; it can search for videos, playlists
> +and/or channels. The videos are streamed directly in a selected video player
> +at the best resolution (customizable) and with closed-captions (if available).
> +Both command-line and GTK2 interface are available.")
> + (home-page "https://github.com/trizen/youtube-viewer")
> + (license license:perl-license)))
> +
> (define-public libbluray
> (package
> (name "libbluray")
> --
> 2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (4 preceding siblings ...)
2018-02-24 23:33 ` [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer Alex Vong
@ 2018-02-26 1:03 ` Marius Bakke
2018-02-26 19:30 ` Alex Vong
2018-02-26 18:49 ` [bug#30598] [PATCH 1/5] gnu: Add perl-cairo Alex Vong
` (4 subsequent siblings)
10 siblings, 1 reply; 15+ messages in thread
From: Marius Bakke @ 2018-02-26 1:03 UTC (permalink / raw)
To: Alex Vong, 30598
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
Alex Vong <alexvong1995@gmail.com> writes:
> Tags: patch
>
> Hello,
>
> This patch series adds youtube-viewer and its dependencies. It can be
> used for searching youtube videos without running javascript. It also
> plays nice with tor which is a plus.
Thanks for this series! The patches LGTM, but can you move the perl
packages to gtk.scm and glib.scm respectively? That seems more
appropriate, as we already have e.g. pygtk in gtk.scm, and also avoids
some top-module cross-references.
(Additionally, perl.scm is huge, so it's good to spread the load to
appease the Guile compiler)
Thanks in advance! :-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer.
2018-02-26 1:03 ` [bug#30598] [PATCH 0/5] " Marius Bakke
@ 2018-02-26 19:30 ` Alex Vong
2018-02-28 16:07 ` bug#30598: " Marius Bakke
0 siblings, 1 reply; 15+ messages in thread
From: Alex Vong @ 2018-02-26 19:30 UTC (permalink / raw)
To: Marius Bakke; +Cc: alexvong1995, 30598
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
Marius Bakke <mbakke@fastmail.com> writes:
> Alex Vong <alexvong1995@gmail.com> writes:
>
>> Tags: patch
>>
>> Hello,
>>
>> This patch series adds youtube-viewer and its dependencies. It can be
>> used for searching youtube videos without running javascript. It also
>> plays nice with tor which is a plus.
>
> Thanks for this series! The patches LGTM, but can you move the perl
> packages to gtk.scm and glib.scm respectively? That seems more
> appropriate, as we already have e.g. pygtk in gtk.scm, and also avoids
> some top-module cross-references.
>
> (Additionally, perl.scm is huge, so it's good to spread the load to
> appease the Guile compiler)
>
> Thanks in advance! :-)
(I messed up my mail settings, so I am re-sending.)
The next patch series should fix everything you've mentioned so far. I
don't understand why wrap-program is used before but now I do.
Thanks for your review also!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#30598: [PATCH 0/5] gnu: Add youtube-viewer.
2018-02-26 19:30 ` Alex Vong
@ 2018-02-28 16:07 ` Marius Bakke
0 siblings, 0 replies; 15+ messages in thread
From: Marius Bakke @ 2018-02-28 16:07 UTC (permalink / raw)
To: Alex Vong; +Cc: 30598-done
[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]
Alex Vong <alexvong1995@gmail.com> writes:
> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Alex Vong <alexvong1995@gmail.com> writes:
>>
>>> Tags: patch
>>>
>>> Hello,
>>>
>>> This patch series adds youtube-viewer and its dependencies. It can be
>>> used for searching youtube videos without running javascript. It also
>>> plays nice with tor which is a plus.
>>
>> Thanks for this series! The patches LGTM, but can you move the perl
>> packages to gtk.scm and glib.scm respectively? That seems more
>> appropriate, as we already have e.g. pygtk in gtk.scm, and also avoids
>> some top-module cross-references.
>>
>> (Additionally, perl.scm is huge, so it's good to spread the load to
>> appease the Guile compiler)
>>
>> Thanks in advance! :-)
>
> (I messed up my mail settings, so I am re-sending.)
>
> The next patch series should fix everything you've mentioned so far. I
> don't understand why wrap-program is used before but now I do.
Excellent, thank you! I moved the perl-cairo and perl-pango packages to
gtk.scm as well and pushed the series as b0a2c9cbe..6f45e45d4.
> Thanks for your review also!
:-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 1/5] gnu: Add perl-cairo.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (5 preceding siblings ...)
2018-02-26 1:03 ` [bug#30598] [PATCH 0/5] " Marius Bakke
@ 2018-02-26 18:49 ` Alex Vong
2018-02-26 18:49 ` [bug#30598] [PATCH 2/5] gnu: Add perl-glib Alex Vong
` (3 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-26 18:49 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Attachment #1.1: 0001-gnu-Add-perl-cairo.patch --]
[-- Type: text/x-diff, Size: 2447 bytes --]
From f541d27bcc6e7670e612ee83478a1ccec891cfec Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:48:47 +0800
Subject: [PATCH 1/5] gnu: Add perl-cairo.
* gnu/packages/perl.scm (perl-cairo): New public variable.
---
gnu/packages/perl.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index cef42847c..c9de36a45 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,6 +46,7 @@
#:use-module (guix build-system perl)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-web)
#:use-module (gnu packages pkg-config))
@@ -680,6 +682,31 @@ processes can safely access the cache at the same time. It uses a basic LRU
algorithm to keep the most used entries in the cache.")
(license (package-license perl))))
+(define-public perl-cairo
+ (package
+ (name "perl-cairo")
+ (version "1.106")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1i25kks408c54k2zxskvg54l5k3qadzm8n72ffga9jy7ic0h6j76"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("cairo" ,cairo)))
+ (home-page "http://search.cpan.org/dist/Cairo/")
+ (synopsis "Perl interface to the cairo 2d vector graphics library")
+ (description "Cairo provides Perl bindings for the vector graphics library
+cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
+produces identical output on all those targets.")
+ (license lgpl2.1+)))
+
(define-public perl-capture-tiny
(package
(name "perl-capture-tiny")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 2/5] gnu: Add perl-glib.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (6 preceding siblings ...)
2018-02-26 18:49 ` [bug#30598] [PATCH 1/5] gnu: Add perl-cairo Alex Vong
@ 2018-02-26 18:49 ` Alex Vong
2018-02-26 18:50 ` [bug#30598] [PATCH 3/5] gnu: Add perl-pango Alex Vong
` (2 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-26 18:49 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Attachment #1.1: 0002-gnu-Add-perl-glib.patch --]
[-- Type: text/x-diff, Size: 2230 bytes --]
From 169a401d4b2b3ed77b2f050a3fbbc6d8f74915af Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:49:54 +0800
Subject: [PATCH 2/5] gnu: Add perl-glib.
* gnu/packages/glib.scm (perl-glib): New public variable.
---
gnu/packages/glib.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index d32472b85..fb5989665 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -622,6 +623,33 @@ useful for C++.")
("python-pycairo" ,python2-pycairo)
("gobject-introspection" ,gobject-introspection)))))
+(define-public perl-glib
+ (package
+ (name "perl-glib")
+ (version "1.326")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0prn9kkdpwjq9qmzqashbhk3pq4gvlrmvm3b10xf1dhc48406382"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("glib" ,glib)))
+ (home-page "http://search.cpan.org/dist/Glib/")
+ (synopsis "Perl wrappers for the GLib utility and Object libraries")
+ (description "This module provides perl access to GLib and GLib's GObject
+libraries. GLib is a portability and utility library; GObject provides a
+generic type system with inheritance and a powerful signal system. Together
+these libraries are used as the foundation for many of the libraries that make
+up the Gnome environment, and are used in many unrelated projects.")
+ (license license:lgpl2.1+)))
+
(define telepathy-glib
(package
(name "telepathy-glib")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 3/5] gnu: Add perl-pango.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (7 preceding siblings ...)
2018-02-26 18:49 ` [bug#30598] [PATCH 2/5] gnu: Add perl-glib Alex Vong
@ 2018-02-26 18:50 ` Alex Vong
2018-02-26 18:51 ` [bug#30598] [PATCH 4/5] gnu: Add perl-gtk2 Alex Vong
2018-02-26 18:51 ` [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer Alex Vong
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-26 18:50 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0003-gnu-Add-perl-pango.patch --]
[-- Type: text/x-diff, Size: 2827 bytes --]
From 32c5cc61a5aefbb69de2bf95e377acc65d77499f Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:51:43 +0800
Subject: [PATCH 3/5] gnu: Add perl-pango.
* gnu/packages/perl.scm (perl-pango): New public variable.
---
gnu/packages/perl.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index c9de36a45..a276df6fb 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -46,6 +46,7 @@
#:use-module (guix build-system perl)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-web)
@@ -6441,6 +6442,43 @@ show those variables which are in scope at the point of the call. PadWalker
is particularly useful for debugging.")
(license (package-license perl))))
+(define-public perl-pango
+ (package
+ (name "perl-pango")
+ (version "1.227")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("pango" ,pango)))
+ (propagated-inputs
+ `(("perl-cairo" ,perl-cairo)
+ ("perl-glib" ,perl-glib)))
+ (home-page "http://search.cpan.org/dist/Pango/")
+ (synopsis "Layout and render international text")
+ (description "Pango is a library for laying out and rendering text, with an
+emphasis on internationalization. Pango can be used anywhere that text layout
+is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
+complete solution with high quality text handling and graphics rendering.
+
+Dynamically loaded modules handle text layout for particular combinations of
+script and font backend. Pango provides a wide selection of modules, including
+modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
+Virtually all of the world's major scripts are supported.
+
+In addition to the low level layout rendering routines, Pango includes
+@code{Pango::Layout}, a high level driver for laying out entire blocks of text,
+and routines to assist in editing internationalized text.")
+ (license lgpl2.1+)))
+
(define-public perl-parallel-forkmanager
(package
(name "perl-parallel-forkmanager")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 4/5] gnu: Add perl-gtk2.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (8 preceding siblings ...)
2018-02-26 18:50 ` [bug#30598] [PATCH 3/5] gnu: Add perl-pango Alex Vong
@ 2018-02-26 18:51 ` Alex Vong
2018-02-26 18:51 ` [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer Alex Vong
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-26 18:51 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Attachment #1.1: 0004-gnu-Add-perl-gtk2.patch --]
[-- Type: text/x-diff, Size: 2494 bytes --]
From 92c6e1eedf87c38eb24a76aff41e8a1366ea6ebc Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:51:09 +0800
Subject: [PATCH 4/5] gnu: Add perl-gtk2.
* gnu/packages/gtk.scm (perl-gtk2): New public variable.
---
gnu/packages/gtk.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 2939e4f64..1eb1bffb6 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,6 +41,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system waf)
#:use-module (gnu packages)
@@ -1238,6 +1240,33 @@ targeted at GTK 2.x, and can be used in conjunction with gnome-python to
write GNOME applications.")
(license license:lgpl2.1+)))
+(define-public perl-gtk2
+ (package
+ (name "perl-gtk2")
+ (version "1.24992")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1044rj3wbfmgaif2jb0k28m2aczli6ai2n5yvn6pr7zjyw16kvd2"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-extutils-depends" ,perl-extutils-depends)
+ ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
+ (inputs
+ `(("gtk+" ,gtk+-2)))
+ (propagated-inputs
+ `(("perl-pango" ,perl-pango)))
+ (home-page "http://search.cpan.org/dist/Gtk2/")
+ (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
+ (description "Perl bindings to the 2.x series of the Gtk+ widget set.
+This module allows you to write graphical user interfaces in a Perlish and
+object-oriented way, freeing you from the casting and memory management in C,
+yet remaining very close in spirit to original API.")
+ (license license:lgpl2.1+)))
+
(define-public girara
(package
(name "girara")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#30598] [PATCH 5/5] gnu: Add youtube-viewer.
2018-02-24 23:27 [bug#30598] [PATCH 0/5] gnu: Add youtube-viewer Alex Vong
` (9 preceding siblings ...)
2018-02-26 18:51 ` [bug#30598] [PATCH 4/5] gnu: Add perl-gtk2 Alex Vong
@ 2018-02-26 18:51 ` Alex Vong
10 siblings, 0 replies; 15+ messages in thread
From: Alex Vong @ 2018-02-26 18:51 UTC (permalink / raw)
To: 30598; +Cc: alexvong1995
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0005-gnu-Add-youtube-viewer.patch --]
[-- Type: text/x-diff, Size: 3617 bytes --]
From 5334e61ed866f67af38688dac077f53f85ad013b Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Sun, 25 Feb 2018 06:52:10 +0800
Subject: [PATCH 5/5] gnu: Add youtube-viewer.
* gnu/packages/video.scm (youtube-viewer): New public variable.
---
gnu/packages/video.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bf7a3960d..48b86a5ac 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -53,6 +53,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system waf)
#:use-module (gnu packages)
@@ -1311,6 +1312,59 @@ audio, images) from the Web. It can use either mpv or vlc for playback.")
(home-page "https://you-get.org/")
(license license:expat)))
+(define-public youtube-viewer
+ (package
+ (name "youtube-viewer")
+ (version "3.3.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/trizen/youtube-viewer/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1j572his6qmazlmyrbnfq62s9bqml875ay7wy26byy9hfc7m0vgk"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-build" ,perl-module-build)))
+ ;; FIXME: Add optional dependencies once available:
+ ;; perl-lwp-useragent-cached and perl-term-readline-gnu
+ (inputs
+ `(("perl-data-dump" ,perl-data-dump)
+ ("perl-file-sharedir" ,perl-file-sharedir)
+ ("perl-gtk2" ,perl-gtk2)
+ ("perl-json" ,perl-json)
+ ("perl-libwww" ,perl-libwww)
+ ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
+ ("perl-mozilla-ca" ,perl-mozilla-ca)
+ ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
+ (arguments
+ `(#:modules ((guix build perl-build-system)
+ (guix build utils)
+ (srfi srfi-26))
+ #:module-build-flags '("--gtk")
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin-dir (string-append (assoc-ref outputs "out")
+ "/bin/"))
+ (perl-path (getenv "PERL5LIB")))
+ (for-each (cut wrap-program <>
+ `("PERL5LIB" ":" prefix (,perl-path)))
+ (find-files bin-dir))
+ #t))))))
+ (synopsis
+ "Lightweight application for searching and streaming videos from YouTube")
+ (description
+ "Youtube-viewer searches and plays YouTube videos in a native player.
+It comes with various search options; it can search for videos, playlists
+and/or channels. The videos are streamed directly in a selected video player
+at the best resolution (customizable) and with closed-captions (if available).
+Both command-line and GTK2 interface are available.")
+ (home-page "https://github.com/trizen/youtube-viewer")
+ (license license:perl-license)))
+
(define-public libbluray
(package
(name "libbluray")
--
2.16.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread