| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 |
|
| 32 | (define-module (gnu packages ebook)
|
| 33 | #:use-module ((guix licenses) #:prefix license:)
|
| 34 | #:use-module (guix packages)
|
| 35 | #:use-module (guix download)
|
| 36 | #:use-module (guix utils)
|
| 37 | #:use-module (guix gexp)
|
| 38 | #:use-module (guix git-download)
|
| 39 | #:use-module (guix build-system cmake)
|
| 40 | #:use-module (guix build-system gnu)
|
| 41 | #:use-module (guix build-system meson)
|
| 42 | #:use-module (guix build-system pyproject)
|
| 43 | #:use-module (guix build-system qt)
|
| 44 | #:use-module (gnu packages)
|
| 45 | #:use-module (gnu packages autotools)
|
| 46 | #:use-module (gnu packages bash)
|
| 47 | #:use-module (gnu packages check)
|
| 48 | #:use-module (gnu packages compression)
|
| 49 | #:use-module (gnu packages curl)
|
| 50 | #:use-module (gnu packages cmake)
|
| 51 | #:use-module (gnu packages databases)
|
| 52 | #:use-module (gnu packages digest)
|
| 53 | #:use-module (gnu packages file)
|
| 54 | #:use-module (gnu packages fonts)
|
| 55 | #:use-module (gnu packages fontutils)
|
| 56 | #:use-module (gnu packages freedesktop)
|
| 57 | #:use-module (gnu packages fribidi)
|
| 58 | #:use-module (gnu packages gcc)
|
| 59 | #:use-module (gnu packages gettext)
|
| 60 | #:use-module (gnu packages gtk)
|
| 61 | #:use-module (gnu packages gnome)
|
| 62 | #:use-module (gnu packages glib)
|
| 63 | #:use-module (gnu packages gstreamer)
|
| 64 | #:use-module (gnu packages hunspell)
|
| 65 | #:use-module (gnu packages icu4c)
|
| 66 | #:use-module (gnu packages image)
|
| 67 | #:use-module (gnu packages javascript)
|
| 68 | #:use-module (gnu packages language)
|
| 69 | #:use-module (gnu packages libreoffice)
|
| 70 | #:use-module (gnu packages libusb)
|
| 71 | #:use-module (gnu packages machine-learning)
|
| 72 | #:use-module (gnu packages music)
|
| 73 | #:use-module (gnu packages pantheon)
|
| 74 | #:use-module (gnu packages pdf)
|
| 75 | #:use-module (gnu packages pkg-config)
|
| 76 | #:use-module (gnu packages python)
|
| 77 | #:use-module (gnu packages python-build)
|
| 78 | #:use-module (gnu packages python-compression)
|
| 79 | #:use-module (gnu packages python-crypto)
|
| 80 | #:use-module (gnu packages python-web)
|
| 81 | #:use-module (gnu packages python-xyz)
|
| 82 | #:use-module (gnu packages qt)
|
| 83 | #:use-module (gnu packages video)
|
| 84 | #:use-module (gnu packages serialization)
|
| 85 | #:use-module (gnu packages speech)
|
| 86 | #:use-module (gnu packages sqlite)
|
| 87 | #:use-module (gnu packages time)
|
| 88 | #:use-module (gnu packages tls)
|
| 89 | #:use-module (gnu packages web)
|
| 90 | #:use-module (gnu packages xml)
|
| 91 | #:use-module (gnu packages xorg)
|
| 92 | #:use-module (gnu packages xdisorg)
|
| 93 | #:use-module (gnu packages wxwidgets))
|
| 94 |
|
| 95 | (define-public chmlib
|
| 96 | (package
|
| 97 | (name "chmlib")
|
| 98 | (version "0.40")
|
| 99 | (source (origin
|
| 100 | (method url-fetch)
|
| 101 | (uri (string-append "http://www.jedrea.com/chmlib/chmlib-"
|
| 102 | version ".tar.bz2"))
|
| 103 | (sha256
|
| 104 | (base32
|
| 105 | "18zzb4x3z0d7fjh1x5439bs62dmgsi4c1pg3qyr7h5gp1i5xcj9l"))
|
| 106 | (patches (search-patches "chmlib-inttypes.patch"))))
|
| 107 | (build-system gnu-build-system)
|
| 108 | (arguments
|
| 109 | (list
|
| 110 | #:configure-flags
|
| 111 | #~(list "CFLAGS=-Wno-error=implicit-function-declaration")))
|
| 112 | (home-page "http://www.jedrea.com/chmlib/")
|
| 113 | (synopsis "Library for CHM files")
|
| 114 | (description "CHMLIB is a library for dealing with ITSS/CHM format files.")
|
| 115 | (license license:lgpl2.1+)))
|
| 116 |
|
| 117 | (define-public python-pychm
|
| 118 | (package
|
| 119 | (name "python-pychm")
|
| 120 | (version "0.8.6")
|
| 121 | (source
|
| 122 | (origin
|
| 123 | (method git-fetch)
|
| 124 | (uri (git-reference
|
| 125 | (url "https://github.com/dottedmag/pychm")
|
| 126 | (commit (string-append "v" version))))
|
| 127 | (file-name (git-file-name name version))
|
| 128 | (sha256
|
| 129 | (base32
|
| 130 | "0zf2vnrby2m31nvi6p3isspbrjmzjw1vwfx3xl7bkvjs7sli1wbw"))))
|
| 131 | (build-system pyproject-build-system)
|
| 132 | (native-inputs
|
| 133 | (list python-pytest python-setuptools))
|
| 134 | (inputs
|
| 135 | (list chmlib))
|
| 136 | (home-page "https://github.com/dottedmag/pychm")
|
| 137 | (synopsis "Handle CHM files")
|
| 138 | (description "This package provides a Python module for interacting
|
| 139 | with Microsoft Compiled HTML (CHM) files.")
|
| 140 | (license license:gpl2+)))
|
| 141 |
|
| 142 | (define-public calibre
|
| 143 | (package
|
| 144 | (name "calibre")
|
| 145 | (version "8.16.2")
|
| 146 | (source
|
| 147 | (origin
|
| 148 | (method url-fetch)
|
| 149 | (uri (string-append "http://download.calibre-ebook.com/" version
|
| 150 | "/calibre-" version ".tar.xz"))
|
| 151 | (sha256
|
| 152 | (base32 "0v0w5hi8h1fykf1v2dqcz9zafc7ffxlh5nj125sc0g7mai1x11q1"))
|
| 153 | (modules '((guix build utils)))
|
| 154 | (snippet
|
| 155 | '(begin
|
| 156 | |
| 157 | (delete-file-recursively "src/odf")
|
| 158 | |
| 159 | (substitute* "setup/test.py"
|
| 160 | ((".*SRC, 'odf'.*") ""))
|
| 161 | |
| 162 | (delete-file "resources/mozilla-ca-certs.pem")
|
| 163 | (delete-file "resources/calibre-portable.bat")
|
| 164 | (delete-file "resources/calibre-portable.sh")))
|
| 165 | (patches (search-patches "calibre-no-updates-dialog.patch"
|
| 166 | "calibre-remove-test-sqlite.patch" |
| 167 | "calibre-remove-test-unrar.patch"
|
| 168 | "calibre-remove-test-import-modules.patch" |
| 169 | ))))
|
| 170 | (build-system pyproject-build-system)
|
| 171 | (native-inputs
|
| 172 | (list bash-minimal
|
| 173 | cmake
|
| 174 | pkg-config
|
| 175 | python-pyqt-builder
|
| 176 | qtbase |
| 177 | xdg-utils
|
| 178 | python-setuptools
|
| 179 | python-tzdata
|
| 180 | python-tzlocal))
|
| 181 | (inputs
|
| 182 | (list bash-minimal
|
| 183 | espeak-ng
|
| 184 | ffmpeg
|
| 185 | font-liberation
|
| 186 | fontconfig
|
| 187 | glib
|
| 188 | hunspell
|
| 189 | hyphen
|
| 190 | icu4c
|
| 191 | libjpeg-turbo
|
| 192 | libjxr
|
| 193 | libmtp
|
| 194 | libpng
|
| 195 | libstemmer
|
| 196 | libusb
|
| 197 | libxkbcommon
|
| 198 | onnxruntime
|
| 199 | openssl
|
| 200 | optipng
|
| 201 | podofo
|
| 202 | poppler
|
| 203 | python-apsw
|
| 204 | python-beautifulsoup4
|
| 205 | python-cchardet
|
| 206 | python-css-parser
|
| 207 | python-cssselect
|
| 208 | python-dateutil
|
| 209 | python-dnspython
|
| 210 | python-feedparser
|
| 211 | python-fonttools
|
| 212 | python-html2text
|
| 213 | python-html5-parser
|
| 214 | python-html5lib
|
| 215 | python-jeepney
|
| 216 | python-lxml
|
| 217 | python-markdown
|
| 218 | python-mechanize
|
| 219 | |
| 220 | python-msgpack
|
| 221 | python-netifaces
|
| 222 | python-odfpy
|
| 223 | python-pillow
|
| 224 | python-psutil
|
| 225 | python-py7zr
|
| 226 | python-pychm
|
| 227 | python-pycryptodome
|
| 228 | python-pygments
|
| 229 | python-pykakasi
|
| 230 | python-pyqt-6
|
| 231 | python-pyqtwebengine-6
|
| 232 | python-regex
|
| 233 | python-xxhash
|
| 234 | python-zeroconf
|
| 235 | qtwebengine
|
| 236 | speech-dispatcher
|
| 237 | sqlite
|
| 238 | uchardet))
|
| 239 | (arguments
|
| 240 | (list
|
| 241 | #:phases
|
| 242 | #~(modify-phases %standard-phases
|
| 243 | (add-after 'unpack 'patch-source
|
| 244 | (lambda _
|
| 245 | (substitute* "src/calibre/linux.py"
|
| 246 | |
| 247 | (("self\\.create_uninstaller()") ""))))
|
| 248 | (add-after 'patch-source-shebangs 'patch-more-shebangs
|
| 249 | (lambda* (#:key inputs native-inputs #:allow-other-keys)
|
| 250 | |
| 251 | (substitute* '("src/calibre/gui2/preferences/tweaks.py"
|
| 252 | "src/calibre/gui2/dialogs/custom_recipes.py"
|
| 253 | "setup/install.py"
|
| 254 | "setup/linux-installer.sh")
|
| 255 | (("#!/usr/bin/env python")
|
| 256 | (string-append "#!" (search-input-file inputs "/bin/python")))
|
| 257 | (("#!/bin/sh")
|
| 258 | (string-append "#!"
|
| 259 | (search-input-file native-inputs "/bin/sh"))))))
|
| 260 | (add-after 'unpack 'dont-load-remote-icons
|
| 261 | (lambda _
|
| 262 | (substitute* "setup/plugins_mirror.py"
|
| 263 | (("href=\"//calibre-ebook.com/favicon.ico\"")
|
| 264 | "href=\"favicon.ico\""))))
|
| 265 | (add-after 'unpack 'skip-7z-test |
| 266 | (lambda _
|
| 267 | (substitute* "src/calibre/utils/seven_zip.py"
|
| 268 | (("(def test_basic\\(\\).*)" line)
|
| 269 | (string-append line "\n return True\n")))))
|
| 270 | (add-after 'unpack 'skip-flaky-test
|
| 271 | (lambda _
|
| 272 | (substitute* "src/calibre/srv/tests/web_sockets.py"
|
| 273 | (("^([ \t]*)def test_websocket_basic\\(.*" line lead)
|
| 274 | (string-append line "\n" lead " return True\n")))))
|
| 275 | (add-before 'build 'configure
|
| 276 | (lambda* (#:key inputs #:allow-other-keys)
|
| 277 | (substitute* "setup/build.py"
|
| 278 | (("\\[tool.sip.bindings.pictureflow\\]")
|
| 279 | "[tool.sip.bindings.pictureflow]
|
| 280 | tags = [\"WS_X11\"]")
|
| 281 | (("\\[tool.sip.project\\]")
|
| 282 | (string-append "[tool.sip.project]
|
| 283 | sip-include-dirs = [\""
|
| 284 | #$(this-package-input "python-pyqt")
|
| 285 | "/lib/python"
|
| 286 | #$(version-major+minor (package-version python))
|
| 287 | "/site-packages/PyQt6/bindings\"]")))
|
| 288 | (substitute* "src/calibre/ebooks/pdf/pdftohtml.py"
|
| 289 | (("PDFTOHTML = 'pdftohtml'")
|
| 290 | (string-append "PDFTOHTML = \""
|
| 291 | (search-input-file inputs "/bin/pdftohtml")
|
| 292 | "\"")))
|
| 293 | |
| 294 | |
| 295 | (substitute* "src/calibre/utils/img.py"
|
| 296 | (("get_exe_path..jpegtran..")
|
| 297 | (string-append "'"
|
| 298 | (search-input-file inputs "/bin/jpegtran")
|
| 299 | "'"))
|
| 300 | (("get_exe_path..cjpeg..")
|
| 301 | (string-append "'"
|
| 302 | (search-input-file inputs "/bin/cjpeg")
|
| 303 | "'"))
|
| 304 | (("get_exe_path..optipng..")
|
| 305 | (string-append "'"
|
| 306 | (search-input-file inputs "/bin/optipng")
|
| 307 | "'"))
|
| 308 | (("get_exe_path..JxrDecApp..")
|
| 309 | (string-append "'"
|
| 310 | (search-input-file inputs "/bin/JxrDecApp")
|
| 311 | "'")))
|
| 312 | |
| 313 | |
| 314 | |
| 315 | (setenv "XDG_DATA_HOME" (string-append #$output "/share"))
|
| 316 | (substitute* "src/calibre/linux.py"
|
| 317 | (("'~/.local/share'") "''"))
|
| 318 | |
| 319 | |
| 320 | (setenv "HOME" "/tmp")
|
| 321 | |
| 322 | |
| 323 | |
| 324 | (symlink (string-append #$(this-package-input "font-liberation")
|
| 325 | "/share/fonts")
|
| 326 | "/tmp/.fonts")
|
| 327 | (let ((podofo #$(this-package-input "podofo")))
|
| 328 | (setenv "PODOFO_INC_DIR"
|
| 329 | (string-append podofo "/include/podofo"))
|
| 330 | (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))
|
| 331 | |
| 332 | |
| 333 | (setenv "CI" "true")
|
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | (setenv "SKIP_QT_BUILD_TEST" "true")
|
| 339 | (setenv "SKIP_SPEECH_TESTS" "true")))
|
| 340 | (add-after 'install 'install-rapydscript
|
| 341 | (lambda _
|
| 342 | |
| 343 | (unsetenv "XDG_DATA_HOME")
|
| 344 | (invoke "python" "setup.py" "rapydscript")))
|
| 345 | (add-after 'install 'install-man-pages
|
| 346 | (lambda _
|
| 347 | (copy-recursively "man-pages"
|
| 348 | (string-append #$output "/share/man"))))
|
| 349 | |
| 350 | |
| 351 | (replace 'build
|
| 352 | (lambda _
|
| 353 | (invoke "python" "setup.py" "build")))
|
| 354 | (replace 'install
|
| 355 | (lambda _
|
| 356 | (invoke "python" "setup.py" "install"
|
| 357 | (string-append "--prefix=" #$output))))
|
| 358 | (replace 'check
|
| 359 | (lambda* (#:key tests? #:allow-other-keys)
|
| 360 | (when tests?
|
| 361 | (invoke "python" "setup.py" "test"))))
|
| 362 | |
| 363 | |
| 364 | (add-after 'install 'unbundle-font-liberation
|
| 365 | (lambda _
|
| 366 | (let ((font-dest
|
| 367 | (string-append #$output "/share/calibre/fonts/liberation"))
|
| 368 | (font-src
|
| 369 | (string-append #$(this-package-input "font-liberation")
|
| 370 | "/share/fonts/truetype")))
|
| 371 | (delete-file-recursively font-dest)
|
| 372 | (symlink font-src font-dest)))))))
|
| 373 | (home-page "https://calibre-ebook.com/")
|
| 374 | (synopsis "E-book library management software")
|
| 375 | (description "Calibre is an e-book library manager. It can view, convert
|
| 376 | and catalog e-books in most of the major e-book formats. It can also talk
|
| 377 | to many e-book reader devices. It can go out to the Internet and fetch
|
| 378 | metadata for books. It can download newspapers and convert them into
|
| 379 | e-books for convenient reading.")
|
| 380 | |
| 381 | |
| 382 | (license (list license:gpl3+
|
| 383 | license:gpl2+
|
| 384 | license:lgpl2.1+
|
| 385 | license:lgpl2.1
|
| 386 | license:bsd-3
|
| 387 | license:expat
|
| 388 | license:zpl2.1
|
| 389 | license:asl2.0
|
| 390 | license:public-domain
|
| 391 | license:silofl1.1
|
| 392 | license:cc-by-sa3.0))))
|
| 393 |
|
| 394 | (define-public ebook-tools
|
| 395 | (package
|
| 396 | (name "ebook-tools")
|
| 397 | (version "0.2.2")
|
| 398 | (source
|
| 399 | (origin
|
| 400 | (method url-fetch)
|
| 401 | (uri (string-append "mirror://sourceforge/ebook-tools/ebook-tools/"
|
| 402 | version "/ebook-tools-" version ".tar.gz"))
|
| 403 | (sha256
|
| 404 | (base32
|
| 405 | "1bi7wsz3p5slb43kj7lgb3r6lb91lvb6ldi556k4y50ix6b5khyb"))))
|
| 406 | (arguments
|
| 407 | `(#:tests? #f)) |
| 408 | (build-system cmake-build-system)
|
| 409 | (native-inputs
|
| 410 | (list pkg-config))
|
| 411 | (inputs
|
| 412 | (list libzip libxml2))
|
| 413 | (home-page "http://ebook-tools.sourceforge.net")
|
| 414 | (synopsis "Tools and library for dealing with various ebook file formats")
|
| 415 | (description "This package provides command-line tools and a library for
|
| 416 | accessing and converting various ebook file formats.")
|
| 417 | (license license:expat)))
|
| 418 |
|
| 419 | (define-public epub-thumbnailer
|
| 420 | |
| 421 | (let ((commit "de4b5bf0fcd1817d560f180231f7bd22d330f1be")
|
| 422 | (revision "0"))
|
| 423 | (package
|
| 424 | (name "epub-thumbnailer")
|
| 425 | (version (git-version "0.0.0" revision commit))
|
| 426 | (home-page "https://github.com/marianosimone/epub-thumbnailer")
|
| 427 | (source
|
| 428 | (origin
|
| 429 | (method git-fetch)
|
| 430 | (uri (git-reference
|
| 431 | (url home-page)
|
| 432 | (commit commit)))
|
| 433 | (file-name (git-file-name name version))
|
| 434 | (sha256
|
| 435 | (base32 "1bkknrcds67qkgci6kdkv51fz8hzmqg8z1vkkni4jl4vgix7cjxg"))))
|
| 436 | (build-system pyproject-build-system)
|
| 437 | (arguments
|
| 438 | (list
|
| 439 | #:tests? #f |
| 440 | #:phases
|
| 441 | #~(modify-phases %standard-phases
|
| 442 | (add-after 'strip 'rename-program
|
| 443 | (lambda _
|
| 444 | (with-directory-excursion #$output
|
| 445 | (rename-file "bin/epub-thumbnailer.py"
|
| 446 | "bin/epub-thumbnailer")))))))
|
| 447 | (propagated-inputs (list python-pillow))
|
| 448 | (native-inputs (list python-setuptools))
|
| 449 | (synopsis
|
| 450 | "Extract the cover of an epub book and create a thumbnail for it")
|
| 451 | (description
|
| 452 | "@code{epub-thumbnailer} is a simple script that tries to find a cover
|
| 453 | into an epub file and creates a thumbnail for it.")
|
| 454 | (license license:gpl3))))
|
| 455 |
|
| 456 | (define-public inkbox
|
| 457 | (package
|
| 458 | (name "inkbox")
|
| 459 | (version "1.7")
|
| 460 | (home-page "https://github.com/Kobo-InkBox/inkbox")
|
| 461 | (source
|
| 462 | (origin
|
| 463 | (method git-fetch)
|
| 464 | (uri
|
| 465 | (git-reference
|
| 466 | (url home-page)
|
| 467 | (commit version)))
|
| 468 | (file-name (git-file-name name version))
|
| 469 | (sha256
|
| 470 | (base32 "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))
|
| 471 | (build-system qt-build-system)
|
| 472 | (arguments
|
| 473 | (list
|
| 474 | #:tests? #f |
| 475 | #:make-flags
|
| 476 | #~(list (string-append "PREFIX=" #$output))
|
| 477 | #:modules '((guix build qt-build-system)
|
| 478 | ((guix build gnu-build-system) #:prefix gnu:)
|
| 479 | (guix build utils))
|
| 480 | #:phases
|
| 481 | #~(modify-phases %standard-phases
|
| 482 | (add-after 'unpack 'prefix-opt
|
| 483 | (lambda _
|
| 484 | (substitute* "inkbox.pro"
|
| 485 | (("/opt/\\$\\$\\{TARGET\\}")
|
| 486 | #$output))))
|
| 487 | (replace 'configure
|
| 488 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 489 | (apply invoke (cons "qmake" make-flags))))
|
| 490 | (replace 'build (assoc-ref gnu:%standard-phases 'build))
|
| 491 | (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
|
| 492 | (native-inputs
|
| 493 | (list qtbase-5))
|
| 494 | (inputs
|
| 495 | (list qtwayland-5))
|
| 496 | (synopsis "EBook reader")
|
| 497 | (description "This package provides InkBox eBook reader.")
|
| 498 | (license license:gpl3)))
|
| 499 |
|
| 500 | (define-public liblinebreak
|
| 501 | (package
|
| 502 | (name "liblinebreak")
|
| 503 | (version "2.1")
|
| 504 | (source (origin
|
| 505 | (method url-fetch)
|
| 506 | (uri (string-append "mirror://sourceforge/vimgadgets"
|
| 507 | "/liblinebreak/" version
|
| 508 | "/liblinebreak-" version ".tar.gz"))
|
| 509 | (sha256
|
| 510 | (base32
|
| 511 | "1f36dbq7nc77lln1by2n1yl050g9dc63viawhs3gc3169mavm36x"))))
|
| 512 | (build-system gnu-build-system)
|
| 513 | (home-page "https://vimgadgets.sourceforge.net/liblinebreak/")
|
| 514 | (synopsis "Library for detecting where linebreaks are allowed in text")
|
| 515 | (description "@code{liblinebreak} is an implementation of the line
|
| 516 | breaking algorithm as described in Unicode 6.0.0 Standard Annex 14,
|
| 517 | Revision 26. It breaks lines that contain Unicode characters. It is
|
| 518 | designed to be used in a generic text renderer.")
|
| 519 | (license license:zlib)))
|
| 520 |
|
| 521 | (define-public cozy
|
| 522 | (package
|
| 523 | (name "cozy")
|
| 524 | (version "1.3.0")
|
| 525 | (source
|
| 526 | (origin
|
| 527 | (method git-fetch)
|
| 528 | (uri (git-reference
|
| 529 | (url "https://github.com/geigi/cozy")
|
| 530 | (commit version)))
|
| 531 | (file-name (git-file-name name version))
|
| 532 | (sha256
|
| 533 | (base32 "0g3nxhh6q8gy760g9kzw1iqfkkxkp5xnhxsxbnslpjv7cz7ivj50"))))
|
| 534 | (build-system meson-build-system)
|
| 535 | (arguments
|
| 536 | (list
|
| 537 | #:glib-or-gtk? #t
|
| 538 | #:phases
|
| 539 | #~(modify-phases %standard-phases
|
| 540 | (add-after 'unpack 'patch-desktop-file
|
| 541 | (lambda _
|
| 542 | (substitute* "data/com.github.geigi.cozy.desktop"
|
| 543 | (("Exec=com.github.geigi.cozy") "Exec=cozy"))))
|
| 544 | (add-after 'install 'patch-executable-name
|
| 545 | (lambda _
|
| 546 | (with-directory-excursion (string-append #$output "/bin")
|
| 547 | (rename-file "com.github.geigi.cozy" "cozy"))))
|
| 548 | (add-after 'patch-executable-name 'wrap-libs
|
| 549 | (lambda _
|
| 550 | (let* ((pylib (string-append
|
| 551 | #$output "/lib/python"
|
| 552 | #$(version-major+minor
|
| 553 | (package-version
|
| 554 | (this-package-native-input
|
| 555 | "python-wrapper")))
|
| 556 | "/site-packages"))
|
| 557 | (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
|
| 558 | (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
|
| 559 | (libmagic-path #$(file-append
|
| 560 | (this-package-input "file") "/lib"))
|
| 561 | (python-path (getenv "GUIX_PYTHONPATH")))
|
| 562 | (wrap-program (string-append #$output "/bin/cozy")
|
| 563 | `("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
|
| 564 | `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
|
| 565 | `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
|
| 566 | `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
|
| 567 | (native-inputs
|
| 568 | (list desktop-file-utils
|
| 569 | gettext-minimal
|
| 570 | `(,glib "bin")
|
| 571 | gobject-introspection
|
| 572 | `(,gtk+ "bin")
|
| 573 | pkg-config
|
| 574 | python-wrapper))
|
| 575 | (inputs
|
| 576 | (list bash-minimal
|
| 577 | file
|
| 578 | granite
|
| 579 | gsettings-desktop-schemas
|
| 580 | gst-libav
|
| 581 | gst-plugins-bad
|
| 582 | gst-plugins-good
|
| 583 | gst-plugins-ugly
|
| 584 | gtk+
|
| 585 | libadwaita
|
| 586 | libdazzle
|
| 587 | libgee
|
| 588 | libhandy
|
| 589 | python-distro
|
| 590 | python-gst
|
| 591 | python-mutagen
|
| 592 | python-packaging
|
| 593 | python-peewee
|
| 594 | python-pycairo
|
| 595 | python-pygobject
|
| 596 | python-pytz
|
| 597 | python-requests))
|
| 598 | (home-page "https://cozy.geigi.de/")
|
| 599 | (synopsis "Modern audiobook player using GTK+")
|
| 600 | (description
|
| 601 | "Cozy is a modern audiobook player written in GTK+.
|
| 602 |
|
| 603 | Some of the current features:
|
| 604 |
|
| 605 | @itemize
|
| 606 | @item Import your audiobooks into Cozy to browse them comfortably
|
| 607 | @item Sort your audio books by author, reader & name
|
| 608 | @item Remembers your playback position
|
| 609 | @item Sleep timer
|
| 610 | @item Playback speed control
|
| 611 | @item Search your library
|
| 612 | @item Offline mode
|
| 613 | @item Add multiple storage locations
|
| 614 | @item Drag & Drop to import new audio books
|
| 615 | @item Support for DRM free mp3, m4a (aac, ALAC, …), flac, ogg, opus, wav files
|
| 616 | @item Mpris integration (Media keys & playback info for desktop environment)
|
| 617 | @end itemize")
|
| 618 | |
| 619 | (license (list license:gpl3+ |
| 620 | license:asl2.0)))) |
| 621 |
|
| 622 | (define-public xchm
|
| 623 | (package
|
| 624 | (name "xchm")
|
| 625 | (version "1.35")
|
| 626 | (source (origin
|
| 627 | (method url-fetch)
|
| 628 | (uri (string-append "https://github.com/rzvncj/xCHM"
|
| 629 | "/releases/download/"
|
| 630 | version "/xchm-" version ".tar.gz"))
|
| 631 | (sha256
|
| 632 | (base32
|
| 633 | "19w9cmdncqgy20bk8njbvcz5xld15pq5slf7m477vhnvws8a373i"))))
|
| 634 | (build-system gnu-build-system)
|
| 635 | (inputs
|
| 636 | (list wxwidgets chmlib))
|
| 637 | (native-inputs
|
| 638 | (list pkg-config))
|
| 639 | (home-page "https://github.com/rzvncj/xCHM")
|
| 640 | (synopsis "CHM file viewer")
|
| 641 | (description "xCHM is a graphical CHM file viewer. It is a frontend to
|
| 642 | the CHM library CHMLIB.")
|
| 643 | (license license:gpl2+)))
|
| 644 |
|
| 645 | (define-public libmobi
|
| 646 | (package
|
| 647 | (name "libmobi")
|
| 648 | (version "0.12")
|
| 649 | (source (origin
|
| 650 | (method git-fetch)
|
| 651 | (uri (git-reference
|
| 652 | (url "https://github.com/bfabiszewski/libmobi/")
|
| 653 | (commit (string-append "v" version))))
|
| 654 | (file-name (git-file-name name version))
|
| 655 | (sha256
|
| 656 | (base32
|
| 657 | "0cwya9n0rd97ai0fcqjwq7b3sjzigf3ywp7bnkbbw541f3knpds9"))))
|
| 658 | (build-system gnu-build-system)
|
| 659 | (native-inputs
|
| 660 | (list autoconf automake libtool))
|
| 661 | (inputs
|
| 662 | (list zlib libxml2))
|
| 663 | (home-page "https://github.com/bfabiszewski/libmobi/")
|
| 664 | (synopsis "C library for handling MOBI formats")
|
| 665 | (description "Libmobi is a C library for handling MOBI ebook
|
| 666 | format documents, with the following features:
|
| 667 |
|
| 668 | @itemize
|
| 669 | @item reading and parsing:
|
| 670 | @itemize
|
| 671 | @item some older text Palmdoc formats (pdb),
|
| 672 | @item Mobipocket files (prc, mobi),
|
| 673 | @item newer MOBI files including KF8 format (azw, azw3),
|
| 674 | @item Replica Print files (azw4)
|
| 675 | @end itemize
|
| 676 | @item recreating source files using indices
|
| 677 | @item reconstructing references (links and embedded) in html files
|
| 678 | @item reconstructing source structure that can be fed back to kindlegen
|
| 679 | @item reconstructing dictionary markup (orth, infl tags)
|
| 680 | @item writing back loaded documents
|
| 681 | @item metadata editing
|
| 682 | @item handling encrypted documents
|
| 683 | @end itemize\n")
|
| 684 | (license license:lgpl3+)))
|
| 685 |
|
| 686 | (define-public python-ebooklib
|
| 687 | (package
|
| 688 | (name "python-ebooklib")
|
| 689 | (version "0.18")
|
| 690 | (source (origin
|
| 691 | (method url-fetch)
|
| 692 | (uri (pypi-uri "EbookLib" version))
|
| 693 | (sha256
|
| 694 | (base32
|
| 695 | "0cx5q6hvaka5lsbzc5q93mfkpsg44x4hp4z9aszxk55wlx1jcmiq"))))
|
| 696 | (build-system pyproject-build-system)
|
| 697 | (arguments (list #:tests? #f)) |
| 698 | (propagated-inputs (list python-lxml python-six))
|
| 699 | (native-inputs (list python-setuptools python-wheel))
|
| 700 | (home-page "https://github.com/aerkalov/ebooklib")
|
| 701 | (synopsis "Ebook library which can handle EPUB2/EPUB3 and Kindle format")
|
| 702 | (description
|
| 703 | "Ebook library which can handle EPUB2/EPUB3 and Kindle format.")
|
| 704 | (license license:agpl3+)))
|
| 705 |
|
| 706 | (define-public shirah
|
| 707 | (package
|
| 708 | (name "shirah")
|
| 709 | (version "1.0.0")
|
| 710 | (source
|
| 711 | (origin
|
| 712 | (method git-fetch)
|
| 713 | (uri (git-reference
|
| 714 | (url "https://github.com/hallicopter/shirah-reader")
|
| 715 | (commit version)))
|
| 716 | (file-name (git-file-name name version))
|
| 717 | (sha256
|
| 718 | (base32 "0df59bq71b9i78cws5z4cdgjdxj59dvz0x4wpnjpxz0g4wvvc55d"))))
|
| 719 | (build-system pyproject-build-system)
|
| 720 | (arguments (list #:tests? #f)) |
| 721 | (native-inputs (list python-setuptools))
|
| 722 | (propagated-inputs (list python-beautifulsoup4 python-ebooklib
|
| 723 | python-syllables python-termcolor))
|
| 724 | (home-page "https://github.com/hallicopter/shirah-reader")
|
| 725 | (synopsis "Terminal ebook reader with an optional RSVP mode")
|
| 726 | (description
|
| 727 | "@command{shirah} is a curses based terminal ebook reader that can
|
| 728 | display ebooks in the usual way or with Rapid Serial Visual Presentation, a
|
| 729 | method to enable speedreading by showing the text word by word at configurable
|
| 730 | speeds.")
|
| 731 | (license license:gpl2+)))
|