Merge branch 'master' into staging.
[jackhill/guix/guix.git] / gnu / packages / ebook.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2017, 2019, 2020, 2021 Brendan Tildesley <mail@brendan.scot>
6 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
7 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
9 ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
10 ;;; Copyright © 2020 Zheng Junjie <873216071@qq.com>
11 ;;; Copyright © 2021 la snesne <lasnesne@lagunposprasihopre.org>
12 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages ebook)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix utils)
34 #:use-module (guix gexp)
35 #:use-module (guix git-download)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system meson)
39 #:use-module (guix build-system python)
40 #:use-module (guix build-system qt)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages databases)
47 #:use-module (gnu packages file)
48 #:use-module (gnu packages fonts)
49 #:use-module (gnu packages fontutils)
50 #:use-module (gnu packages freedesktop)
51 #:use-module (gnu packages fribidi)
52 #:use-module (gnu packages gcc)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gstreamer)
58 #:use-module (gnu packages icu4c)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages javascript)
61 #:use-module (gnu packages language)
62 #:use-module (gnu packages libusb)
63 #:use-module (gnu packages libreoffice)
64 #:use-module (gnu packages music)
65 #:use-module (gnu packages pantheon)
66 #:use-module (gnu packages pdf)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages python-build)
70 #:use-module (gnu packages python-compression)
71 #:use-module (gnu packages python-crypto)
72 #:use-module (gnu packages python-web)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages qt)
75 #:use-module (gnu packages serialization)
76 #:use-module (gnu packages speech)
77 #:use-module (gnu packages sqlite)
78 #:use-module (gnu packages time)
79 #:use-module (gnu packages tls)
80 #:use-module (gnu packages web)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (gnu packages wxwidgets))
84
85 (define-public chmlib
86 (package
87 (name "chmlib")
88 (version "0.40")
89 (source (origin
90 (method url-fetch)
91 (uri (string-append "http://www.jedrea.com/chmlib/chmlib-"
92 version ".tar.bz2"))
93 (sha256
94 (base32
95 "18zzb4x3z0d7fjh1x5439bs62dmgsi4c1pg3qyr7h5gp1i5xcj9l"))
96 (patches (search-patches "chmlib-inttypes.patch"))))
97 (build-system gnu-build-system)
98 (home-page "http://www.jedrea.com/chmlib/")
99 (synopsis "Library for CHM files")
100 (description "CHMLIB is a library for dealing with ITSS/CHM format files.")
101 (license license:lgpl2.1+)))
102
103 (define-public python-pychm
104 (package
105 (name "python-pychm")
106 (version "0.8.6")
107 (source
108 (origin
109 (method url-fetch)
110 (uri (pypi-uri "pychm" version))
111 (sha256
112 (base32
113 "0wpn9ijlsmrpyiwg3drmgz4dms1i1i347adgqw37bkrh3vn6yq16"))))
114 (build-system python-build-system)
115 (inputs
116 (list chmlib))
117 (home-page "https://github.com/dottedmag/pychm")
118 (synopsis "Handle CHM files")
119 (description "This package provides a Python module for interacting
120 with Microsoft Compiled HTML (CHM) files")
121 (license license:gpl2+)))
122
123 (define-public calibre
124 (package
125 (name "calibre")
126 (version "5.36.0")
127 (source
128 (origin
129 (method url-fetch)
130 (uri (string-append "http://download.calibre-ebook.com/"
131 version "/calibre-"
132 version ".tar.xz"))
133 (sha256
134 (base32
135 "1c036qmn7lxq0899c2xzzs6whz7z0557frnfqisbvfxa13b2sadk"))
136 (modules '((guix build utils)))
137 (snippet
138 '(begin
139 ;; Unbundle python2-odfpy.
140 (delete-file-recursively "src/odf")
141 ;; Disable test that attempts to load it.
142 (substitute* "setup/test.py"
143 ((".*SRC, 'odf'.*") ""))
144 ;; Remove unneeded resources.
145 (delete-file "resources/mozilla-ca-certs.pem")
146 (delete-file "resources/calibre-portable.bat")
147 (delete-file "resources/calibre-portable.sh")))
148 (patches (search-patches "calibre-no-updates-dialog.patch"
149 "calibre-remove-test-sqlite.patch" ; TODO: fix test.
150 "calibre-remove-test-unrar.patch"))))
151 (build-system python-build-system)
152 (native-inputs
153 (list bash-minimal
154 pkg-config
155 python-flake8
156 python-pyqt-builder
157 qtbase-5 ; for qmake
158 xdg-utils))
159 (inputs
160 (list fontconfig
161 font-liberation
162 glib
163 hunspell
164 hyphen
165 icu4c
166 libmtp
167 libpng
168 libjpeg-turbo
169 libjxr
170 libstemmer
171 libusb
172 openssl
173 optipng
174 podofo
175 poppler
176 python-apsw
177 python-beautifulsoup4
178 python-cchardet
179 python-css-parser
180 python-cssselect
181 python-dateutil
182 python-dnspython-1.16
183 python-feedparser
184 python-html2text
185 python-html5-parser
186 python-html5lib
187 python-jeepney
188 python-lxml
189 python-markdown
190 python-mechanize
191 ;; python-msgpack is needed for the network content server to work.
192 python-msgpack
193 python-netifaces
194 python-odfpy
195 python-pillow
196 python-psutil
197 python-py7zr
198 python-pychm
199 python-pygments
200 python-pyqt-without-qtwebkit
201 python-pyqtwebengine
202 python-regex
203 speech-dispatcher
204 python-zeroconf
205 qtwebengine
206 sqlite))
207 (arguments
208 (list
209 ;; Calibre is using setuptools by itself, but the setup.py is not
210 ;; compatible with the shim wrapper (taken from pip) we are using.
211 #:use-setuptools? #f
212 #:phases
213 #~(modify-phases %standard-phases
214 (add-after 'unpack 'patch-source
215 (lambda _
216 (substitute* "src/calibre/linux.py"
217 ;; We can't use the uninstaller in Guix. Don't build it.
218 (("self\\.create_uninstaller()") ""))))
219 (add-after 'patch-source-shebangs 'patch-more-shebangs
220 (lambda* (#:key inputs native-inputs #:allow-other-keys)
221 ;; Patch various inline shebangs.
222 (substitute* '("src/calibre/gui2/preferences/tweaks.py"
223 "src/calibre/gui2/dialogs/custom_recipes.py"
224 "setup/install.py"
225 "setup/linux-installer.sh")
226 (("#!/usr/bin/env python")
227 (string-append "#!" (search-input-file inputs "/bin/python")))
228 (("#!/bin/sh")
229 (string-append "#!"
230 (search-input-file native-inputs "/bin/sh"))))))
231 (add-after 'unpack 'dont-load-remote-icons
232 (lambda _
233 (substitute* "setup/plugins_mirror.py"
234 (("href=\"//calibre-ebook.com/favicon.ico\"")
235 "href=\"favicon.ico\""))))
236 (add-before 'build 'configure
237 (lambda* (#:key inputs #:allow-other-keys)
238 (substitute* "setup/build.py"
239 (("\\[tool.sip.bindings.pictureflow\\]")
240 "[tool.sip.bindings.pictureflow]
241 tags = [\"WS_X11\"]")
242 (("\\[tool.sip.project\\]")
243 (string-append "[tool.sip.project]
244 sip-include-dirs = [\""
245 #$(this-package-input
246 "python-pyqt-without-qtwebkit")
247 "/share/sip\"]")))
248 (substitute* "src/calibre/ebooks/pdf/pdftohtml.py"
249 (("PDFTOHTML = 'pdftohtml'")
250 (string-append "PDFTOHTML = \""
251 (search-input-file inputs "/bin/pdftohtml")
252 "\"")))
253 ;; get_exe_path looks in poppler's output for these
254 ;; binaries. Make it not do that.
255 (substitute* "src/calibre/utils/img.py"
256 (("get_exe_path..jpegtran..")
257 (string-append "'"
258 (search-input-file inputs "/bin/jpegtran")
259 "'"))
260 (("get_exe_path..cjpeg..")
261 (string-append "'"
262 (search-input-file inputs "/bin/cjpeg")
263 "'"))
264 (("get_exe_path..optipng..")
265 (string-append "'"
266 (search-input-file inputs "/bin/optipng")
267 "'"))
268 (("get_exe_path..JxrDecApp..")
269 (string-append "'"
270 (search-input-file inputs "/bin/JxrDecApp")
271 "'")))
272 ;; Calibre thinks we are installing desktop files into a home
273 ;; directory, but here we butcher the script in to installing
274 ;; to calibres /share directory.
275 (setenv "XDG_DATA_HOME" (string-append #$output "/share"))
276 (substitute* "src/calibre/linux.py"
277 (("'~/.local/share'") "''"))
278 ;; 'python setup.py rapydscript' uses QtWebEngine, which
279 ;; needs to create temporary files in $HOME.
280 (setenv "HOME" "/tmp")
281 ;; XXX: QtWebEngine will fail if no fonts are available. This
282 ;; can likely be removed when fontconfig has been patched to
283 ;; include TrueType fonts by default.
284 (symlink (string-append #$(this-package-input "font-liberation")
285 "/share/fonts")
286 "/tmp/.fonts")
287 (let ((podofo #$(this-package-input "podofo")))
288 (setenv "PODOFO_INC_DIR"
289 (string-append podofo "/include/podofo"))
290 (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))
291 ;; This informs the tests we are a continuous integration
292 ;; environment and thus have no networking.
293 (setenv "CI" "true")
294 ;; The Qt test complains about being unable to load all image
295 ;; plugins, and I notice the available plugins list it shows
296 ;; lacks 'svg'. Adding qtsvg doesn't fix it, so I'm not sure how
297 ;; to fix it. TODO: Fix test and remove this.
298 (setenv "SKIP_QT_BUILD_TEST" "true")))
299 (add-after 'install 'install-rapydscript
300 (lambda _
301 ;; Unset so QtWebengine doesn't dump temporary files here.
302 (unsetenv "XDG_DATA_HOME")
303 (invoke "python" "setup.py" "rapydscript")))
304 (add-after 'install 'install-man-pages
305 (lambda _
306 (copy-recursively "man-pages"
307 (string-append #$output "/share/man"))))
308 ;; The font TTF files are used in some miscellaneous tests, so we
309 ;; unbundle them here to avoid patching the tests.
310 (add-after 'install 'unbundle-font-liberation
311 (lambda _
312 (let ((font-dest
313 (string-append #$output "/share/calibre/fonts/liberation"))
314 (font-src
315 (string-append #$(this-package-input "font-liberation")
316 "/share/fonts/truetype")))
317 (delete-file-recursively font-dest)
318 (symlink font-src font-dest))))
319 ;; Make run-time dependencies available to the binaries.
320 (add-after 'wrap 'wrap-program
321 (lambda* (#:key inputs #:allow-other-keys)
322 (with-directory-excursion (string-append #$output "/bin")
323 (for-each
324 (lambda (binary)
325 (wrap-program binary
326 ;; Make QtWebEngineProcess available.
327 `("QTWEBENGINEPROCESS_PATH" =
328 ,(list
329 (search-input-file
330 inputs "/lib/qt5/libexec/QtWebEngineProcess")))))
331 ;; Wrap all the binaries shipping with the package, except
332 ;; for the wrappings created during the 'wrap standard
333 ;; phase. This extends existing .calibre-real wrappers
334 ;; rather than create ..calibre-real-real-s. For more
335 ;; information see: https://issues.guix.gnu.org/43249.
336 (find-files "." (lambda (file stat)
337 (not (wrapped-program? file)))))))))))
338 (home-page "https://calibre-ebook.com/")
339 (synopsis "E-book library management software")
340 (description "Calibre is an e-book library manager. It can view, convert
341 and catalog e-books in most of the major e-book formats. It can also talk
342 to many e-book reader devices. It can go out to the Internet and fetch
343 metadata for books. It can download newspapers and convert them into
344 e-books for convenient reading.")
345 ;; Calibre is largely GPL3+, but includes a number of components covered
346 ;; by other licenses. See COPYRIGHT for more details.
347 (license (list license:gpl3+
348 license:gpl2+
349 license:lgpl2.1+
350 license:lgpl2.1
351 license:bsd-3
352 license:expat
353 license:zpl2.1
354 license:asl2.0
355 license:public-domain
356 license:silofl1.1
357 license:cc-by-sa3.0))))
358
359 (define-public ebook-tools
360 (package
361 (name "ebook-tools")
362 (version "0.2.2")
363 (source
364 (origin
365 (method url-fetch)
366 (uri (string-append "mirror://sourceforge/ebook-tools/ebook-tools/"
367 version "/ebook-tools-" version ".tar.gz"))
368 (sha256
369 (base32
370 "1bi7wsz3p5slb43kj7lgb3r6lb91lvb6ldi556k4y50ix6b5khyb"))))
371 (arguments
372 `(#:tests? #f)) ; No 'test' target
373 (build-system cmake-build-system)
374 (native-inputs
375 (list pkg-config))
376 (inputs
377 (list libzip libxml2))
378 (home-page "http://ebook-tools.sourceforge.net")
379 (synopsis "Tools and library for dealing with various ebook file formats")
380 (description "This package provides command-line tools and a library for
381 accessing and converting various ebook file formats.")
382 (license license:expat)))
383
384 (define-public inkbox
385 (package
386 (name "inkbox")
387 (version "1.7")
388 (source
389 (origin
390 (method git-fetch)
391 (uri
392 (git-reference
393 (url "https://alpinekobox.ddns.net/InkBox/inkbox/")
394 (commit version)))
395 (file-name (git-file-name name version))
396 (sha256
397 (base32 "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))
398 (build-system qt-build-system)
399 (arguments
400 '(#:tests? #f ; no test suite
401 #:make-flags
402 (list (string-append "PREFIX="
403 (assoc-ref %outputs "out")))
404 #:phases
405 (modify-phases %standard-phases
406 (add-after 'unpack 'prefix-opt
407 (lambda* (#:key outputs #:allow-other-keys)
408 (substitute* "inkbox.pro"
409 (("/opt/\\$\\$\\{TARGET\\}") (string-append (assoc-ref outputs "out"))))))
410 (replace 'configure
411 (lambda* (#:key make-flags #:allow-other-keys)
412 (apply invoke (cons "qmake" make-flags)))))))
413 (native-inputs
414 (list qtbase-5))
415 (home-page "https://alpinekobox.ddns.net/InkBox/inkbox/")
416 (synopsis "EBook reader")
417 (description "This package provides InkBox eBook reader.")
418 (license license:gpl3)))
419
420 (define-public liblinebreak
421 (package
422 (name "liblinebreak")
423 (version "2.1")
424 (source (origin
425 (method url-fetch)
426 (uri (string-append "mirror://sourceforge/vimgadgets"
427 "/liblinebreak/" version
428 "/liblinebreak-" version ".tar.gz"))
429 (sha256
430 (base32
431 "1f36dbq7nc77lln1by2n1yl050g9dc63viawhs3gc3169mavm36x"))))
432 (build-system gnu-build-system)
433 (home-page "http://vimgadgets.sourceforge.net/liblinebreak/")
434 (synopsis "Library for detecting where linebreaks are allowed in text")
435 (description "@code{liblinebreak} is an implementation of the line
436 breaking algorithm as described in Unicode 6.0.0 Standard Annex 14,
437 Revision 26. It breaks lines that contain Unicode characters. It is
438 designed to be used in a generic text renderer.")
439 (license license:zlib)))
440
441 (define-public fbreader
442 (package
443 (name "fbreader")
444 (version "0.99.6")
445 (source (origin
446 (method git-fetch)
447 (uri (git-reference
448 (url "https://github.com/geometer/FBReader")
449 (commit (string-append version "-freebsdport"))))
450 (file-name (git-file-name name version))
451 (sha256
452 (base32
453 "0c0s4silpax74kwfz3dfmzn4lkv6jsyb800vfak166vii0hvbv3d"))
454 (patches (search-patches "fbreader-curl-7.62.patch"))))
455 (build-system gnu-build-system)
456 (inputs
457 `(("curl" ,curl)
458 ("expat" ,expat)
459 ("fribidi" ,fribidi)
460 ("glib" ,glib)
461 ("gtk+-2" ,gtk+-2)
462 ("libjpeg" ,libjpeg-turbo)
463 ("liblinebreak" ,liblinebreak)
464 ("libxft" ,libxft)
465 ("sqlite" ,sqlite)
466 ("zlib" ,zlib)))
467 (native-inputs
468 `(("gcc@5" ,gcc-5)
469 ("pkg-config" ,pkg-config)))
470 (arguments
471 `(#:tests? #f ; No tests exist.
472 #:make-flags `("CC=gcc" "TARGET_ARCH=desktop" "UI_TYPE=gtk"
473 "TARGET_STATUS=release"
474 ,(string-append "INSTALLDIR="
475 (assoc-ref %outputs "out"))
476 ,(string-append "LDFLAGS=-Wl,-rpath="
477 (assoc-ref %outputs "out") "/lib"))
478 #:phases
479 (modify-phases %standard-phases
480 (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
481 (lambda* (#:key inputs #:allow-other-keys)
482 ;; Hide the default GCC from CPLUS_INCLUDE_PATH to prevent a header
483 ;; conflict with the GCC provided in native-inputs.
484 (let ((gcc (assoc-ref inputs "gcc")))
485 (setenv "CPLUS_INCLUDE_PATH"
486 (string-join
487 (delete (string-append gcc "/include/c++")
488 (string-split (getenv "CPLUS_INCLUDE_PATH")
489 #\:))
490 ":"))
491 #t)))
492 (delete 'configure)
493 (add-after 'unpack 'fix-install-locations
494 (lambda* (#:key outputs #:allow-other-keys)
495 (let ((out (assoc-ref outputs "out")))
496 (substitute* "fbreader/desktop/Makefile"
497 (("/usr") out))
498 #t))))))
499 (home-page "https://fbreader.org/")
500 (synopsis "E-Book reader")
501 (description "@code{fbreader} is an E-Book reader. It supports the
502 following formats:
503
504 @enumerate
505 @item CHM
506 @item Docbook
507 @item FB2
508 @item HTML
509 @item OEB
510 @item PDB
511 @item RTF
512 @item TCR
513 @item TXT
514 @item XHTML
515 @end enumerate")
516 (license license:gpl2+)))
517
518 (define-public cozy
519 (package
520 (name "cozy")
521 (version "1.2.0")
522 (source
523 (origin
524 (method git-fetch)
525 (uri (git-reference
526 (url "https://github.com/geigi/cozy")
527 (commit version)))
528 (file-name (git-file-name name version))
529 (sha256
530 (base32 "0igqf9b77i13sxlk4ziw549h379hmz1slrb3vvf8irk94gxabsaw"))))
531 (build-system meson-build-system)
532 (arguments
533 `(#:glib-or-gtk? #t
534 #:phases
535 (modify-phases %standard-phases
536 (add-after 'unpack 'patch-desktop-file
537 (lambda _
538 (substitute* "data/com.github.geigi.cozy.desktop"
539 (("Exec=com.github.geigi.cozy") "Exec=cozy"))))
540 (add-after 'install 'patch-executable-name
541 (lambda* (#:key outputs #:allow-other-keys)
542 (with-directory-excursion
543 (string-append (assoc-ref outputs "out") "/bin")
544 (rename-file "com.github.geigi.cozy" "cozy"))))
545 (add-after 'wrap 'wrap-libs
546 (lambda* (#:key outputs #:allow-other-keys)
547 (let* ((out (assoc-ref outputs "out"))
548 (pylib (string-append
549 out "/lib/python"
550 ,(version-major+minor
551 (package-version python))
552 "/site-packages"))
553 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
554 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
555 (libmagic-path (string-append
556 (assoc-ref %build-inputs "file")
557 "/lib"))
558 (python-path (getenv "GUIX_PYTHONPATH")))
559 (wrap-program (string-append out "/bin/cozy")
560 `("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
561 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
562 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
563 `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
564 (native-inputs
565 (list desktop-file-utils
566 gettext-minimal
567 `(,glib "bin")
568 gobject-introspection
569 `(,gtk+ "bin")
570 pkg-config
571 python-wrapper))
572 (inputs
573 (list bash-minimal
574 file
575 granite
576 gsettings-desktop-schemas
577 gst-libav
578 gst-plugins-bad
579 gst-plugins-good
580 gst-plugins-ugly
581 gtk+
582 libdazzle
583 libgee
584 libhandy
585 python-distro
586 python-gst
587 python-mutagen
588 python-packaging
589 python-peewee
590 python-pycairo
591 python-pygobject
592 python-pytz
593 python-requests))
594 (home-page "https://cozy.geigi.de/")
595 (synopsis "Modern audiobook player using GTK+")
596 (description
597 "Cozy is a modern audiobook player written in GTK+.
598
599 Some of the current features:
600
601 @itemize
602 @item Import your audiobooks into Cozy to browse them comfortably
603 @item Sort your audio books by author, reader & name
604 @item Remembers your playback position
605 @item Sleep timer
606 @item Playback speed control
607 @item Search your library
608 @item Offline mode
609 @item Add multiple storage locations
610 @item Drag & Drop to import new audio books
611 @item Support for DRM free mp3, m4a (aac, ALAC, …), flac, ogg, opus, wav files
612 @item Mpris integration (Media keys & playback info for desktop environment)
613 @end itemize")
614 ;; TODO: Unbundle python-inject.
615 (license (list license:gpl3+ ;cozy
616 license:asl2.0)))) ;python-inject (bundled dependency)
617
618 (define-public xchm
619 (package
620 (name "xchm")
621 (version "1.33")
622 (source (origin
623 (method url-fetch)
624 (uri (string-append "https://github.com/rzvncj/xCHM"
625 "/releases/download/"
626 version "/xchm-" version ".tar.gz"))
627 (sha256
628 (base32
629 "0an09shap2wj9gzj5fsw5sc2i6paq3kc3mc52fnwg2bb2dan5qxk"))))
630 (build-system gnu-build-system)
631 (inputs
632 (list wxwidgets chmlib))
633 (native-inputs
634 (list pkg-config))
635 (home-page "https://github.com/rzvncj/xCHM")
636 (synopsis "CHM file viewer")
637 (description "xCHM is a graphical CHM file viewer. It is a frontend to
638 the CHM library CHMLIB.")
639 (license license:gpl2+)))
640
641 (define-public libmobi
642 (package
643 (name "libmobi")
644 (version "0.6")
645 (source (origin
646 (method git-fetch)
647 (uri (git-reference
648 (url "https://github.com/bfabiszewski/libmobi/")
649 (commit (string-append "v" version))))
650 (file-name (git-file-name name version))
651 (sha256
652 (base32
653 "0yps72cm609xn2k7alflkdhp9kgr1w7zzyxjygz0n1kqrdcplihh"))))
654 (build-system gnu-build-system)
655 (native-inputs
656 (list autoconf automake libtool))
657 (inputs
658 (list zlib libxml2))
659 (home-page "https://github.com/bfabiszewski/libmobi/")
660 (synopsis "C library for handling MOBI formats")
661 (description "Libmobi is a C library for handling MOBI ebook
662 format documents, with the following features:
663
664 @itemize
665 @item reading and parsing:
666 @itemize
667 @item some older text Palmdoc formats (pdb),
668 @item Mobipocket files (prc, mobi),
669 @item newer MOBI files including KF8 format (azw, azw3),
670 @item Replica Print files (azw4)
671 @end itemize
672 @item recreating source files using indices
673 @item reconstructing references (links and embedded) in html files
674 @item reconstructing source structure that can be fed back to kindlegen
675 @item reconstructing dictionary markup (orth, infl tags)
676 @item writing back loaded documents
677 @item metadata editing
678 @item handling encrypted documents
679 @end itemize\n")
680 (license license:lgpl3+)))