[PATCH] Add komikku.

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Prikler
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Leo Prikler
Severity
normal

Debbugs page

Leo Prikler wrote 5 years ago
(address . guix-patches@gnu.org)
d23933fec46615e61efcad12a11a33f5fbb99087.camel@student.tugraz.at
Hi Guix,

I recently found this neat manga reader and decided I'd package it for
Guix. In doing so I've also added missing dependencies, some of which
are newer versions of packages, whose update would belong to core-
updates by the number of (transitive) dependencies.

Regards,
Leo
Leo Prikler wrote 5 years ago
[PATCH 2/7] gnu: Add python-pyparsing-2.4.7.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-2-leo.prikler@student.tugraz.at
* gnu/packages/python-xyz.scm (python-pyparsing-2.4.7): New variable.
---
gnu/packages/python-xyz.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (24 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c62be2e8e4..d8c35fa179 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4654,6 +4654,17 @@ that client code uses to construct the grammar directly in Python code.")
(define-public python2-pyparsing
(package-with-python2 python-pyparsing))
+(define-public python-pyparsing-2.4.7
+ (package
+ (inherit python-pyparsing)
+ (version "2.4.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyparsing" version))
+ (sha256
+ (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
+
(define-public python-numpydoc
(package
(name "python-numpydoc")
--
2.28.0
Leo Prikler wrote 5 years ago
[PATCH 1/7] gnu: Add python-pure-protobuf.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-1-leo.prikler@student.tugraz.at
* gnu/packages/protobuf.scm (python-pure-protobuf): New variable.
---
gnu/packages/protobuf.scm | 53 +++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index b8bd617eca..7aa5e3f948 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -32,11 +32,14 @@
#:use-module (guix build-system emacs)
#:use-module (guix build-system ruby)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix utils)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages check)
#:use-module (gnu packages gcc)
#:use-module (gnu packages libevent)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages ruby))
@@ -227,6 +230,56 @@ encoder in C++. The developer using protozero has to manually translate the
mechanism for serializing structured data.")
(license license:bsd-3)))
+(define-public python-pure-protobuf
+ (package
+ (name "python-pure-protobuf")
+ (version "2.0.0")
+ (source
+ (origin
+ ;; pypi is broken; has no tests
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eigenein/protobuf")
+ (commit version)))
+ (sha256
+ (base32
+ "0lgs99dpfyckz6spib419sl7jpdk2g54pcw0yg59gdcsd1f5zqgz"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-flake8" ,python-flake8)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-isort" ,python-isort)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'setup-test-env
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (py3sitedir
+ (string-append out "/lib/python"
+ ,(version-major+minor
+ (package-version python))
+ "/site-packages")))
+ (setenv "PYTHONPATH"
+ (string-append py3sitedir ":"
+ (getenv "PYTHONPATH"))))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "pytest" "--cov-report" "term-missing" "--cov"
+ "pure_protobuf")
+ (invoke "flake8" "pure_protobuf" "tests"
+ "--ignore=F541")
+ (invoke "isort" "-rc" "-c" "pure_protobuf" "tests")
+ #t)))))
+ (home-page "https://pypi.org/project/pure-protobuf/")
+ (synopsis "Protobuf implementation using dataclasses")
+ (description
+ "Protocol buffers are a language-neutral, platform-neutral extensible
+mechanism for serializing structured data.")
+ (license license:expat)))
+
(define-public python2-protobuf
(package-with-python2 python-protobuf))
--
2.28.0
Leo Prikler wrote 5 years ago
[PATCH 3/7] gnu: Add python-dateparser.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-3-leo.prikler@student.tugraz.at
* gnu/packages/python-xyz.scm (python-dateparser): New variable.
---
gnu/packages/python-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d8c35fa179..e78c0f406c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21649,3 +21649,46 @@ and have a maximum lifetime built-in.")
"This package provides a debug print command and other development tools.
It adds a simple and readable way to print stuff during development.")
(license license:expat)))
+
+(define-public python-dateparser
+ (package
+ (name "python-dateparser")
+ (version "0.7.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "dateparser" version))
+ (sha256
+ (base32
+ "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
+ (build-system python-build-system)
+ (inputs
+ `(("tzdata" ,tzdata)))
+ (propagated-inputs
+ `(("python-dateutil" ,python-dateutil)
+ ("python-pytz" ,python-pytz)
+ ("python-regex" ,python-regex)
+ ("python-ruamel.yaml" ,python-ruamel.yaml)
+ ("python-tzlocal" ,python-tzlocal)))
+ (native-inputs
+ `(("python-mock" ,python-mock)
+ ("python-parameterized" ,python-parameterized)))
+ (arguments
+ `(;; TODO: Of 23320 tests, 6 fail and 53 error.
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'set-check-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TZ" "UTC")
+ (setenv "TZDIR"
+ (string-append (assoc-ref inputs "tzdata")
+ "/share/zoneinfo"))
+ #t)))))
+ (home-page "https://github.com/scrapinghub/dateparser")
+ (synopsis
+ "Date parsing library designed to parse dates from HTML pages")
+ (description
+ "python-dateparser provides modules to easily parse localized dates in
+almost any string formats commonly found on web pages.")
+ (license license:bsd-3)))
--
2.28.0
Leo Prikler wrote 5 years ago
[PATCH 4/7] gnu: Add python-requests-toolbelt-0.9.1.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-4-leo.prikler@student.tugraz.at
* gnu/packages/python-web.scm (python-requests-toolbelt-0.9.1): New variable.
---
gnu/packages/python-web.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 1b97d1401d..f7a623ceba 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2003,6 +2003,20 @@ with python-requests.")
(define-public python2-requests-toolbelt
(package-with-python2 python-requests-toolbelt))
+(define-public python-requests-toolbelt-0.9.1
+ (package
+ (inherit python-requests-toolbelt)
+ (version "0.9.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "requests-toolbelt" version))
+ (sha256
+ (base32
+ "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
+ (arguments
+ `(;; FIXME: Some tests require network access.
+ #:tests? #f))))
+
(define-public python-oauthlib
(package
(name "python-oauthlib")
--
2.28.0
Leo Prikler wrote 5 years ago
[PATCH 5/7] gnu: Add python-cloudscraper.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-5-leo.prikler@student.tugraz.at
* gnu/packages/python-web.scm (python-cloudscraper): New variable.
---
gnu/packages/python-web.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index f7a623ceba..52ea88c5c0 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -4666,3 +4666,39 @@ using a pure Python implementation.")
"This package provices a simple implementation of Encrypted Content
Encoding for HTTP.")
(license license:expat)))
+
+(define-public python-cloudscraper
+ (package
+ (name "python-cloudscraper")
+ (version "1.2.46")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cloudscraper" version))
+ (sha256
+ (base32
+ "1br4p648yassywsd7whz1c7s10rwdysnd7wdqfjq9bksqfxrac3r"))
+ (modules '((guix build utils)))
+ (snippet
+ '(with-directory-excursion "cloudscraper"
+ (for-each delete-file
+ '("captcha/2captcha.py"
+ "captcha/9kw.py"
+ "captcha/anticaptcha.py"
+ "captcha/deathbycaptcha.py"
+ "interpreters/js2py.py"
+ "interpreters/v8.py"))
+ #t))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-requests" ,python-requests)
+ ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
+ ("python-pyparsing" ,python-pyparsing-2.4.7)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/venomous/cloudscraper")
+ (synopsis "Cloudflare anti-bot bypass")
+ (description
+ "This module acts as a webbrowser solving Cloudflare's Javascript
+challenges.")
+ (license license:expat)))
--
2.28.0
Leo Prikler wrote 5 years ago
[PATCH 6/7] gnu: libhandy: Update to 0.90.0.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-6-leo.prikler@student.tugraz.at
* gnu/packages/gnome.scm (libhandy): Update to 0.90.0.
[source]<url>: Use GNOME gitlab.
---
gnu/packages/gnome.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 5664f76ae2..b14e25b1eb 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -10480,16 +10480,16 @@ advanced image management tool")
(define-public libhandy
(package
(name "libhandy")
- (version "0.0.12")
+ (version "0.90.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://source.puri.sm/Librem5/libhandy")
- (commit (string-append "v" version))))
+ (url "https://gitlab.gnome.org/GNOME/libhandy")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "09wlknarzsbk9hr5ws6s7x5kibkhx9ayrbhshfqib4zkhq2f76hw"))))
+ (base32 "1zpfbn2x27lp69w819afxf3ylkgfz9k44srfgmkbb2c33r14ajwy"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
--
2.28.0
Leo Prikler wrote 5 years ago
[PATCH 7/7] gnu: Add komikku.
(address . 43045@debbugs.gnu.org)
20200825173735.16156-7-leo.prikler@student.tugraz.at
* gnu/packages/gnome.scm (komikku): New variable.
---
gnu/packages/gnome.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)

Toggle diff (82 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b14e25b1eb..cfc3c954b8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -155,6 +155,7 @@
#:use-module (gnu packages polkit)
#:use-module (gnu packages popt)
#:use-module (gnu packages pretty-print)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-crypto)
@@ -11336,3 +11337,67 @@ environment (IDE) for writing GNOME-based software. It features fuzzy search,
auto-completion, a mini code map, documentation browsing, Git integration, an
integrated profiler via Sysprof, debugging support, and more.")
(license license:gpl3+)))
+
+(define-public komikku
+ (package
+ (name "komikku")
+ (version "0.19.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/valos/Komikku/")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "16d7k500nd9klnjqqcgk3glhv2sy78yndkz3n0x7lynvblsy45kk"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-sources
+ (lambda _
+ (substitute* "komikku/utils.py"
+ (("from komikku\\.servers import get_servers_list")
+ ;; code following that line should migrate old databases
+ ;; but the line itself results in an import error
+ "return data_dir_path"))))
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ (lambda _
+ (substitute* "meson_post_install.py"
+ (("gtk-update-icon-cache") (which "true")))
+ #t))
+ (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prog (string-append (assoc-ref outputs "out")
+ "/bin/komikku")))
+ (wrap-program prog
+ `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
+ #t))))))
+ (inputs
+ `(("gobject-introspection" ,gobject-introspection)
+ ("gtk+" ,gtk+)
+ ("libhandy" ,libhandy)
+ ("libnotify" ,libnotify)
+ ("libsecret" ,libsecret)
+ ("python-beautifulsoup4" ,python-beautifulsoup4)
+ ("python-cloudscraper" ,python-cloudscraper)
+ ("python-dateparser" ,python-dateparser)
+ ("python-keyring" ,python-keyring)
+ ("python-lxml" ,python-lxml)
+ ("python-magic" ,python-magic)
+ ("python-pillow" ,python-pillow)
+ ("python-pure-protobuf" ,python-pure-protobuf)
+ ("python-pycairo" ,python-pycairo)
+ ("python-pygobject" ,python-pygobject)
+ ("python-unidecode" ,python-unidecode)))
+ (native-inputs
+ `(("glib:bin" ,glib "bin")
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://gitlab.com/valos/Komikku")
+ (synopsis "Manga reader for GNOME")
+ (description "Komikku is an online/offline manga reader for GNOME,
+developed with the aim of being used with the Librem 5 phone.")
+ (license license:gpl3+)))
--
2.28.0
Mathieu Othacehe wrote 5 years ago
Re: [bug#43045] [PATCH] Add komikku.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 43045-done@debbugs.gnu.org)
871rjsgva5.fsf@gnu.org
Hey Leo,

Toggle quote (5 lines)
> I recently found this neat manga reader and decided I'd package it for
> Guix. In doing so I've also added missing dependencies, some of which
> are newer versions of packages, whose update would belong to core-
> updates by the number of (transitive) dependencies.

Thanks for this serie! I fixed a new linting warnings edited some
descriptions and pushed.

Mathieu
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 43045@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 43045
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help