You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

408 lines
17 KiB

gnu: Move web packages from python to python-web. This is in part to address <https://bugs.gnu.org/27284>. * gnu/packages/python.scm (python-httplib2, python2-httplib2) (python-sockjs-tornado, python2-sockjs-tornado) (python-flask-babel, python2-flask-babel) (python-html5lib, python2-html5lib) (python-html5lib-0.9, python2-html5lib-0.9) (python-html5-parser, python2-html5-parser) (python-webencodings, python2-webencodings) (python-openid, python2-openid, python-cssutils, python2-cssutils) (python-cssselect, python2-cssutils) (python-openid-cla, python2-openid-cla) (python-openid-teams, python2-openid-teams) (python-tornado, python2-tornado) (python-tornado-http-auth, python-terminado, python2-terminado) (python-webob, python2-webob, python-zope-event, python2-zope-event) (python-zope-interface, python2-zope-interface) (python-zope-exceptions, python2-zope-exceptions) (python-zope-testing, python2-zope-testing) (python-zope-testrunner, python2-zope-testrunner) (python-zope-i18nmessageid, python2-zope-i18nmessageid) (python-zope-schema, python2-zope-schema) (python-zope-configuration, python2-zope-configuration) (python-zope-proxy, python2-zope-proxy) (python-zope-location, python2-zope-location) (python-zope-security, python2-zope-security) (python-zope-component, python2-zope-component) (python-ndg-httpsclient, python2-ndg-httpsclient) (python-websocket-client, python2-websocket-client) (python-requests-toolbelt, python2-requests-toolbelt) (python-rauth, python2-rauth, python-urllib3, python2-urllib3) (awscli, python-wsgiproxy2, python2-wsgiproxy2) (python-pastedeploy, python2-pastedeploy) (python-webtest, python2-webtest, python-flask, python2-flask) (python-flast-wtf, python2-flask-wtf) (python-flask-multistatic, python2-flask-multistatic) (python-cookies, python2-cookies) (python-responses, python2-responses) (python-geventhttpclient, python2-geventhttpclient) (python-requests-oauthlib, python2-requests-oauthlib) (python-url, python2-url, python-cachecontrol, python2-cachecontrol) (python-betamax, python2-betamax) (python-betamax-matchers, python2-betamax-matchers) (python-s3transfer, python2-s3transfer) (python-flask-restful, python-flask-basicauth) (python-flask-sqlalchemy, python-flask-restplus) (python-flask-restful-swagger, python-htmlmin, python2-htmlmin) (python-flask-htmlmin, python2-flask-htmlmin) (python-flask-login, python2-flask-login) (python-oauth2client, python-flask-oidc) (python-webassets, python-cssmin, python2-cssmin) (python-elasticsearch, python2-elasticsearch) (python-flask-script, python2-flask-script) (python-flask-migrate, python2-flask-migrate) (python-genshi, python2-genshi) (python-flask-principal, python2-flask-principal) (python-flask-httpauth, python2-flask-httpauth) (python-uritemplate, python2-uritemplate): Move to... * gnu/packages/python-web.scm: ... here. New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/admin.scm, gnu/packages/backup.scm, gnu/packages/dav.scm, gnu/packages/django.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/logging.scm, gnu/packages/mail.scm, gnu/packages/music.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/rdf.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm: Adjust accordingly.
4 years ago
gnu: Separate Python core packages from the rest. * gnu/packages/python.scm: Move hundreds of package definitions from here... * gnu/packages/python-xyz.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/benchmark.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/cluster.scm, gnu/packages/compression.scm, gnu/packages/connman.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/finance.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/ham-radio.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/kde-frameworks.scm, gnu/packages/key-mon.scm, gnu/packages/libffi.scm, gnu/packages/libreoffice.scm, gnu/packages/libusb.scm, gnu/packages/lirc.scm, gnu/packages/logging.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/medical.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nutrition.scm, gnu/packages/openldap.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/polkit.scm, gnu/packages/protobuf.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/qt.scm, gnu/packages/rdf.scm, gnu/packages/ruby.scm, gnu/packages/search.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/simulation.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/virtualization.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wicd.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: Update module references.
3 years ago
3 years ago
gnu: packages: Use 'search-patches' everywhere. * gnu/packages/abiword.scm: Use 'search-patches' for 'patches' field. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/algebra.scm: Likewise. * gnu/packages/animation.scm: Likewise. * gnu/packages/apr.scm: Likewise. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/autotools.scm: Likewise. * gnu/packages/avahi.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/bash.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/ci.scm: Likewise. * gnu/packages/cmake.scm: Likewise. * gnu/packages/cpio.scm: Likewise. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/dico.scm: Likewise. * gnu/packages/doxygen.scm: Likewise. * gnu/packages/ebook.scm: Likewise. * gnu/packages/elf.scm: Likewise. * gnu/packages/emacs.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/firmware.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fltk.scm: Likewise. * gnu/packages/ftp.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gawk.scm: Likewise. * gnu/packages/gcc.scm: Likewise. * gnu/packages/gd.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/gnunet.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/gnuzilla.scm: Likewise. * gnu/packages/graphics.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/icu4c.scm: Likewise. * gnu/packages/idutils.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/imagemagick.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/ldc.scm: Likewise. * gnu/packages/libcanberra.scm: Likewise. * gnu/packages/libevent.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libunwind.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/llvm.scm: Likewise. * gnu/packages/lsh.scm: Likewise. * gnu/packages/lua.scm: Likewise. * gnu/packages/lxqt.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/messaging.scm: Likewise. * gnu/packages/mit-krb5.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/multiprecision.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/ninja.scm: Likewise. * gnu/packages/nvi.scm: Likewise. * gnu/packages/ocaml.scm: Likewise. * gnu/packages/orpheus.scm: Likewise. * gnu/packages/ots.scm: Likewise. * gnu/packages/parallel.scm: Likewise. * gnu/packages/patchutils.scm: Likewise. * gnu/packages/pcre.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/plotutils.scm: Likewise. * gnu/packages/polkit.scm: Likewise. * gnu/packages/pulseaudio.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/qemu.scm: Likewise. * gnu/packages/qt.scm: Likewise. * gnu/packages/ratpoison.scm: Likewise. * gnu/packages/rdf.scm: Likewise. * gnu/packages/readline.scm: Likewise. * gnu/packages/rush.scm: Likewise. * gnu/packages/scheme.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/sdl.scm: Likewise. * gnu/packages/slim.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/tcsh.scm: Likewise. * gnu/packages/texinfo.scm: Likewise. * gnu/packages/tls.scm: Likewise. * gnu/packages/tor.scm: Likewise. * gnu/packages/tv.scm: Likewise. * gnu/packages/valgrind.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/vtk.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xfce.scm: Likewise. * gnu/packages/xiph.scm: Likewise. * gnu/packages/xml.scm: Likewise. * gnu/packages/xorg.scm: Likewise. * gnu/packages/zip.scm: Likewise.
6 years ago
gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'. * gnu/packages/abiword.scm (abiword)[inputs]: Change from LIBJPEG to LIBJPEG-TURBO. * gnu/packages/admin.scm (testdisk)[inputs]: Likewise. * gnu/packages/algebra.scm (giac)[inputs]: Likewise. * gnu/packages/animation.scm (synfig)[inputs]: Likewise. * gnu/packages/astronomy.scm (gnuastro, celestia)[inputs]: Likewise. * gnu/packages/cdrom.scm (dvdstyler)[inputs]: Likewise. * gnu/packages/cran.scm (r-jpeg, r-tiff, r-readbitmap)[inputs]: Likewise. * gnu/packages/cups.scm (cups-filters, hplip)[inputs]: Likewise. * gnu/packages/display-managers.scm (slim)[inputs]: Likewise. * gnu/packages/ebook.scm (fbreader)[inputs]: Likewise. * gnu/packages/emacs.scm (emacs)[inputs]: Likewise. * gnu/packages/enlightenment.scm (efl)[propagated-inputs]: Likewise. * gnu/packages/fltk.scm (fltk, ntk)[inputs]: Likewise. * gnu/packages/fontutils.scm (fontforge)[inputs]: Likewise. * gnu/packages/freedesktop.scm (weston)[inputs]: Likewise. * gnu/packages/game-development.scm (sfml, allegro, aseprite, python-pygame, eureka, ioquake3)[inputs]: Likewise. * gnu/packages/games.scm (adanaxisgpl, freedroidrpg, irrlicht, minetest, fizmo, supertuxkart, gzdoom, xmoto, xonotic)[inputs]: Likewise. * gnu/packages/gd.scm (gd, perl-gd)[inputs]: Likewise. * gnu/packages/ghostscript.scm (lcms)[inputs]: Likewise. (ghostscript)[inputs, native-inputs]: Likewise. * gnu/packages/gimp.scm (gegl, gimp)[inputs]: Likewise. * gnu/packages/gnome.scm (libgnomeui, eog, tracker-miners, gthumb)[inputs]: Likewise. * gnu/packages/gnunet.scm (libextractor)[inputs]: Likewise. * gnu/packages/gnustep.scm (windowmaker)[inputs]: Likewise. * gnu/packages/graphics.scm (blender, blender-2.79, openimageio, openscenegraph, openscenegraph-3.4, povray, fgallery)[inputs]: Likewise. * gnu/packages/graphviz.scm (graphviz)[inputs]: Likewise. * gnu/packages/gstreamer.scm (gst-plugins-good)[inputs]: Likewise. * gnu/packages/gtk.scm (gdk-pixbuf)[inputs]: Likewise. * gnu/packages/image-processing.scm (dcmtk, mia, vtk, opencv, vips, nip2, vxl, insight-toolkit)[inputs]: Likewise. * gnu/packages/image-viewers.scm (gpicview, luminance-hdr)[inputs]: Likewise. * gnu/packages/image.scm (jpegoptim, libtiff, leptonica, imlib2, freeimage, vigra, libwebp, libmng, jasper, steghide, jp2a)[inputs]: Likewise. * gnu/packages/imagemagick.scm (imagemagick, graphicsmagick)[inputs]: Likewise. * gnu/packages/java.scm (icedtea-6, icedtea-7, openjdk9, openjdk11, openjdk12)[inputs]: Likewise. * gnu/packages/kde-frameworks.scm (khtml)[inputs]: Likewise. * gnu/packages/kodi.scm (kodi)[inputs]: Likewise. * gnu/packages/machine-learning.scm (dlib, tensorflow)[inputs]: Likewise. * gnu/packages/mate.scm (atril, eom)[inputs]: Likewise. * gnu/packages/maths.scm (hdf4, hdf-java, hdf-eos2, netcdf)[inputs]: Likewise. * gnu/packages/netpbm.scm (netpbm)[inputs]: Likewise. * gnu/packages/pdf.scm (zathura-pdf-mupdf, podofo, mupdf, fbida)[inputs]: Likewise. * gnu/packages/photo.scm (libraw, libpano13, enblend-enfuse, darktable, hugin, rawtherapee)[inputs]: Likewise. * gnu/packages/prolog.scm (swi-prolog)[native-inputs]: Likewise. * gnu/packages/python-xyz.scm (python-hdf4, python-pillow)[inputs]: Likewise. * gnu/packages/qt.scm (qtbase, qtwebkit)[inputs]: Likewise. * gnu/packages/rdesktop.scm (freerdp)[inputs]: Likewise. * gnu/packages/scanner.scm (sane-backends, xsane)[inputs]: Likewise. * gnu/packages/scheme.scm (racket)[inputs]: Likewise. * gnu/packages/scribus.scm (scribus)[inputs]: Likewise. * gnu/packages/sdl.scm (sdl-image)[propagated-inputs]: Likewise. (guile-sdl)[native-inputs]: Likewise. * gnu/packages/spice.scm (spice-gtk)[inputs]: Likewise. * gnu/packages/statistics.scm (r-with-tests)[inputs]: Likewise. * gnu/packages/tcl.scm (perl-tk)[inputs]: Likewise. * gnu/packages/upnp.scm (readymedia)[inputs]: Likewise. * gnu/packages/video.scm (mplayer, mpv, v4l-utils, motion)[inputs]: Likewise. * gnu/packages/web-browsers.scm (dillo, links)[inputs]: Likewise. * gnu/packages/web.scm (netsurf)[inputs]: Likewise. * gnu/packages/webkit.scm (webkitgtk)[inputs]: Likewise. * gnu/packages/wine.scm (wine)[inputs]: Likewise. * gnu/packages/wv.scm (wv)[inputs]: Likewise. * gnu/packages/wxwidgets.scm (wxwidgets, wxwidgets-2)[inputs]: Likewise. * gnu/packages/xdisorg.scm (xscreensaver)[inputs]: Likewise. * gnu/packages/xfce.scm (tumbler)[inputs]: Likewise. * gnu/packages/xfig.scm (xfig, transfig)[inputs]: Likewise. * gnu/packages/xorg.scm (xpra)[inputs]: Likewise.
2 years ago
  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 Brendan Tildesley <mail@brendan.scot>
  6. ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
  7. ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  8. ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  24. (define-module (gnu packages ebook)
  25. #:use-module ((guix licenses) #:prefix license:)
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix git-download)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (gnu packages)
  31. #:use-module (guix build-system python)
  32. #:use-module (gnu packages)
  33. #:use-module (gnu packages compression)
  34. #:use-module (gnu packages curl)
  35. #:use-module (gnu packages databases)
  36. #:use-module (gnu packages fonts)
  37. #:use-module (gnu packages fontutils)
  38. #:use-module (gnu packages freedesktop)
  39. #:use-module (gnu packages fribidi)
  40. #:use-module (gnu packages gcc)
  41. #:use-module (gnu packages gtk)
  42. #:use-module (gnu packages gnome)
  43. #:use-module (gnu packages glib)
  44. #:use-module (gnu packages icu4c)
  45. #:use-module (gnu packages image)
  46. #:use-module (gnu packages javascript)
  47. #:use-module (gnu packages libusb)
  48. #:use-module (gnu packages libreoffice)
  49. #:use-module (gnu packages pdf)
  50. #:use-module (gnu packages pkg-config)
  51. #:use-module (gnu packages python)
  52. #:use-module (gnu packages python-web)
  53. #:use-module (gnu packages python-xyz)
  54. #:use-module (gnu packages qt)
  55. #:use-module (gnu packages serialization)
  56. #:use-module (gnu packages sqlite)
  57. #:use-module (gnu packages time)
  58. #:use-module (gnu packages tls)
  59. #:use-module (gnu packages web)
  60. #:use-module (gnu packages xml)
  61. #:use-module (gnu packages xorg)
  62. #:use-module (gnu packages wxwidgets))
  63. (define-public chmlib
  64. (package
  65. (name "chmlib")
  66. (version "0.40")
  67. (source (origin
  68. (method url-fetch)
  69. (uri (string-append "http://www.jedrea.com/chmlib/chmlib-"
  70. version ".tar.bz2"))
  71. (sha256
  72. (base32
  73. "18zzb4x3z0d7fjh1x5439bs62dmgsi4c1pg3qyr7h5gp1i5xcj9l"))
  74. (patches (search-patches "chmlib-inttypes.patch"))))
  75. (build-system gnu-build-system)
  76. (home-page "http://www.jedrea.com/chmlib/")
  77. (synopsis "Library for CHM files")
  78. (description "CHMLIB is a library for dealing with ITSS/CHM format files.")
  79. (license license:lgpl2.1+)))
  80. (define-public calibre
  81. (package
  82. (name "calibre")
  83. (version "4.18.0")
  84. (source
  85. (origin
  86. (method url-fetch)
  87. (uri (string-append "http://download.calibre-ebook.com/"
  88. version "/calibre-"
  89. version ".tar.xz"))
  90. (sha256
  91. (base32
  92. "0w9pcfvskjh4v00vjw3i6hzrafy863pgsmmqdx4lffip3p856brw"))
  93. (modules '((guix build utils)))
  94. (snippet
  95. '(begin
  96. ;; Unbundle python2-odfpy.
  97. (delete-file-recursively "src/odf")
  98. ;; Disable test that attempts to load it.
  99. (substitute* "setup/test.py"
  100. ((".*SRC, 'odf'.*")
  101. ""))
  102. ;; Remove unneeded resources.
  103. (delete-file "resources/viewer.js")
  104. (delete-file "resources/viewer.html")
  105. (delete-file "resources/mozilla-ca-certs.pem")
  106. (delete-file "resources/calibre-portable.bat")
  107. (delete-file "resources/calibre-portable.sh")
  108. #t))
  109. (patches (search-patches "calibre-no-updates-dialog.patch"
  110. "calibre-remove-test-sqlite.patch" ; TODO: fix test.
  111. "calibre-remove-test-unrar.patch"))))
  112. (build-system python-build-system)
  113. (native-inputs
  114. `(("pkg-config" ,pkg-config)
  115. ("qtbase" ,qtbase) ; for qmake
  116. ("python2-flake8" ,python2-flake8)
  117. ("xdg-utils" ,xdg-utils)))
  118. (inputs
  119. `(("chmlib" ,chmlib)
  120. ("fontconfig" ,fontconfig)
  121. ("font-liberation" ,font-liberation)
  122. ("glib" ,glib)
  123. ("hunspell" ,hunspell)
  124. ("hyphen" ,hyphen)
  125. ("icu4c" ,icu4c)
  126. ("js-mathjax" ,js-mathjax)
  127. ("libmtp" ,libmtp)
  128. ("libpng" ,libpng)
  129. ("libusb" ,libusb)
  130. ("openssl" ,openssl)
  131. ("optipng" ,optipng)
  132. ("podofo" ,podofo)
  133. ("poppler" ,poppler)
  134. ("python" ,python-2)
  135. ("python2-apsw" ,python2-apsw)
  136. ("python2-beautifulsoup4" ,python2-beautifulsoup4)
  137. ("python2-chardet" ,python2-chardet)
  138. ("python2-cssselect" ,python2-cssselect)
  139. ("python2-css-parser" ,python2-css-parser)
  140. ("python2-dateutil" ,python2-dateutil)
  141. ("python2-dbus" ,python2-dbus)
  142. ("python2-dnspython" ,python2-dnspython)
  143. ("python2-dukpy" ,python2-dukpy)
  144. ("python2-feedparser" ,python2-feedparser)
  145. ("python2-html2text" ,python2-html2text)
  146. ("python2-html5-parser" ,python2-html5-parser)
  147. ("python2-html5lib" ,python2-html5lib)
  148. ("python2-lxml" ,python2-lxml)
  149. ("python2-markdown" ,python2-markdown)
  150. ("python2-mechanize" ,python2-mechanize)
  151. ;; python2-msgpack is needed for the network content server to work.
  152. ("python2-msgpack" ,python2-msgpack)
  153. ("python2-netifaces" ,python2-netifaces)
  154. ("python2-odfpy" ,python2-odfpy)
  155. ("python2-pillow" ,python2-pillow)
  156. ("python2-psutil" ,python2-psutil)
  157. ("python2-pygments" ,python2-pygments)
  158. ("python2-pyqtwebengine" ,python2-pyqtwebengine)
  159. ("python2-pyqt" ,python2-pyqt)
  160. ("python2-sip" ,python2-sip)
  161. ("python2-regex" ,python2-regex)
  162. ("qtwebengine" ,qtwebengine)
  163. ("sqlite" ,sqlite)))
  164. (arguments
  165. `(#:python ,python-2
  166. ;; Calibre is using setuptools by itself, but the setup.py is not
  167. ;; compatible with the shim wrapper (taken from pip) we are using.
  168. #:use-setuptools? #f
  169. #:phases
  170. (modify-phases %standard-phases
  171. (add-after 'unpack 'patch-source
  172. (lambda _
  173. (substitute* "src/calibre/linux.py"
  174. ;; We can't use the uninstaller in Guix. Don't build it.
  175. (("self\\.create_uninstaller()") ""))
  176. #t))
  177. (add-after 'patch-source-shebangs 'patch-more-shebangs
  178. (lambda _
  179. ;; Patch various inline shebangs.
  180. (substitute* '("src/calibre/gui2/preferences/tweaks.py"
  181. "src/calibre/gui2/dialogs/custom_recipes.py"
  182. "setup/install.py"
  183. "setup/linux-installer.sh")
  184. (("#!/usr/bin/env python")
  185. (string-append "#!" (which "python")))
  186. (("#!/bin/sh")
  187. (string-append "#!" (which "sh"))))
  188. #t))
  189. (add-after 'unpack 'dont-load-remote-icons
  190. (lambda _
  191. (substitute* "setup/plugins_mirror.py"
  192. (("href=\"//calibre-ebook.com/favicon.ico\"")
  193. "href=\"favicon.ico\""))
  194. #t))
  195. (add-before 'build 'configure
  196. (lambda* (#:key inputs outputs #:allow-other-keys)
  197. (let ((podofo (assoc-ref inputs "podofo"))
  198. (pyqt (assoc-ref inputs "python2-pyqt"))
  199. (python-sip (assoc-ref inputs "python2-sip"))
  200. (out (assoc-ref outputs "out")))
  201. (substitute* "setup/build_environment.py"
  202. (("= get_sip_dir\\(\\)")
  203. (string-append "= '" pyqt "/share/sip'")))
  204. (substitute* "src/calibre/ebooks/pdf/pdftohtml.py"
  205. (("PDFTOHTML = 'pdftohtml'")
  206. (string-append "PDFTOHTML = \"" (assoc-ref inputs "poppler")
  207. "/bin/pdftohtml\"")))
  208. ;; Calibre thinks we are installing desktop files into a home
  209. ;; directory, but here we butcher the script in to installing
  210. ;; to calibres /share directory.
  211. (setenv "XDG_DATA_HOME" (string-append out "/share"))
  212. (substitute* "src/calibre/linux.py"
  213. (("'~/.local/share'") "''"))
  214. ;; 'python setup.py rapydscript' uses QtWebEngine, which
  215. ;; needs to create temporary files in $HOME.
  216. (setenv "HOME" "/tmp")
  217. ;; XXX: QtWebEngine will fail if no fonts are available. This
  218. ;; can likely be removed when fontconfig has been patched to
  219. ;; include TrueType fonts by default.
  220. (symlink (string-append (assoc-ref inputs "font-liberation")
  221. "/share/fonts")
  222. "/tmp/.fonts")
  223. (setenv "SIP_BIN" (string-append python-sip "/bin/sip"))
  224. (setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo"))
  225. (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))
  226. ;; This informs the tests we are a continuous integration
  227. ;; environment and thus have no networking.
  228. (setenv "CI" "true")
  229. ;; The Qt test complains about being unable to load all image plugins, and I
  230. ;; notice the available plugins list it shows lacks 'svg'. Adding qtsvg doesn't
  231. ;; fix it, so I'm not sure how to fix it. TODO: Fix test and remove this.
  232. (setenv "SKIP_QT_BUILD_TEST" "true")
  233. #t)))
  234. (add-after 'build 'build-extra
  235. (lambda* (#:key inputs #:allow-other-keys)
  236. (invoke "python2" "setup.py" "mathjax""--system-mathjax"
  237. "--path-to-mathjax" (string-append
  238. (assoc-ref inputs "js-mathjax")
  239. "/share/javascript/mathjax"))
  240. (invoke "python2" "setup.py" "rapydscript")))
  241. (add-after 'install 'install-man-pages
  242. (lambda* (#:key outputs #:allow-other-keys)
  243. (copy-recursively
  244. "man-pages"
  245. (string-append (assoc-ref outputs "out") "/share/man"))
  246. #t))
  247. ;; The font TTF files are used in some miscellaneous tests, so we
  248. ;; unbundle them here to avoid patching the tests.
  249. (add-after 'install 'unbundle-font-liberation
  250. (lambda* (#:key inputs outputs #:allow-other-keys)
  251. (let ((font-dest (string-append (assoc-ref outputs "out")
  252. "/share/calibre/fonts/liberation"))
  253. (font-src (string-append (assoc-ref inputs "font-liberation")
  254. "/share/fonts/truetype")))
  255. (delete-file-recursively font-dest)
  256. (symlink font-src font-dest))
  257. #t)))))
  258. (home-page "https://calibre-ebook.com/")
  259. (synopsis "E-book library management software")
  260. (description "Calibre is an e-book library manager. It can view, convert
  261. and catalog e-books in most of the major e-book formats. It can also talk
  262. to many e-book reader devices. It can go out to the Internet and fetch
  263. metadata for books. It can download newspapers and convert them into
  264. e-books for convenient reading.")
  265. ;; Calibre is largely GPL3+, but includes a number of components covered
  266. ;; by other licenses. See COPYRIGHT for more details.
  267. (license (list license:gpl3+
  268. license:gpl2+
  269. license:lgpl2.1+
  270. license:lgpl2.1
  271. license:bsd-3
  272. license:expat
  273. license:zpl2.1
  274. license:asl2.0
  275. license:public-domain
  276. license:silofl1.1
  277. license:cc-by-sa3.0))))
  278. (define-public liblinebreak
  279. (package
  280. (name "liblinebreak")
  281. (version "2.1")
  282. (source (origin
  283. (method url-fetch)
  284. (uri (string-append "mirror://sourceforge/vimgadgets"
  285. "/liblinebreak/" version
  286. "/liblinebreak-" version ".tar.gz"))
  287. (sha256
  288. (base32
  289. "1f36dbq7nc77lln1by2n1yl050g9dc63viawhs3gc3169mavm36x"))))
  290. (build-system gnu-build-system)
  291. (home-page "http://vimgadgets.sourceforge.net/liblinebreak/")
  292. (synopsis "Library for detecting where linebreaks are allowed in text")
  293. (description "@code{liblinebreak} is an implementation of the line
  294. breaking algorithm as described in Unicode 6.0.0 Standard Annex 14,
  295. Revision 26. It breaks lines that contain Unicode characters. It is
  296. designed to be used in a generic text renderer.")
  297. (license license:zlib)))
  298. (define-public fbreader
  299. (package
  300. (name "fbreader")
  301. (version "0.99.6")
  302. (source (origin
  303. (method git-fetch)
  304. (uri (git-reference
  305. (url "https://github.com/geometer/FBReader")
  306. (commit (string-append version "-freebsdport"))))
  307. (file-name (git-file-name name version))
  308. (sha256
  309. (base32
  310. "0c0s4silpax74kwfz3dfmzn4lkv6jsyb800vfak166vii0hvbv3d"))
  311. (patches (search-patches "fbreader-curl-7.62.patch"))))
  312. (build-system gnu-build-system)
  313. (inputs
  314. `(("curl" ,curl)
  315. ("expat" ,expat)
  316. ("fribidi" ,fribidi)
  317. ("glib" ,glib)
  318. ("gtk+-2" ,gtk+-2)
  319. ("libjpeg" ,libjpeg-turbo)
  320. ("liblinebreak" ,liblinebreak)
  321. ("libxft" ,libxft)
  322. ("sqlite" ,sqlite)
  323. ("zlib" ,zlib)))
  324. (native-inputs
  325. `(("gcc@5" ,gcc-5)
  326. ("pkg-config" ,pkg-config)))
  327. (arguments
  328. `(#:tests? #f ; No tests exist.
  329. #:make-flags `("CC=gcc" "TARGET_ARCH=desktop" "UI_TYPE=gtk"
  330. "TARGET_STATUS=release"
  331. ,(string-append "INSTALLDIR="
  332. (assoc-ref %outputs "out"))
  333. ,(string-append "LDFLAGS=-Wl,-rpath="
  334. (assoc-ref %outputs "out") "/lib"))
  335. #:phases
  336. (modify-phases %standard-phases
  337. (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
  338. (lambda* (#:key inputs #:allow-other-keys)
  339. ;; Hide the default GCC from CPLUS_INCLUDE_PATH to prevent a header
  340. ;; conflict with the GCC provided in native-inputs.
  341. (let ((gcc (assoc-ref inputs "gcc")))
  342. (setenv "CPLUS_INCLUDE_PATH"
  343. (string-join
  344. (delete (string-append gcc "/include/c++")
  345. (string-split (getenv "CPLUS_INCLUDE_PATH")
  346. #\:))
  347. ":"))
  348. #t)))
  349. (delete 'configure)
  350. (add-after 'unpack 'fix-install-locations
  351. (lambda* (#:key outputs #:allow-other-keys)
  352. (let ((out (assoc-ref outputs "out")))
  353. (substitute* "fbreader/desktop/Makefile"
  354. (("/usr") out))
  355. #t))))))
  356. (home-page "https://fbreader.org/")
  357. (synopsis "E-Book reader")
  358. (description "@code{fbreader} is an E-Book reader. It supports the
  359. following formats:
  360. @enumerate
  361. @item CHM
  362. @item Docbook
  363. @item FB2
  364. @item HTML
  365. @item OEB
  366. @item PDB
  367. @item RTF
  368. @item TCR
  369. @item TXT
  370. @item XHTML
  371. @end enumerate")
  372. (license license:gpl2+)))
  373. (define-public xchm
  374. (package
  375. (name "xchm")
  376. (version "1.31")
  377. (source (origin
  378. (method url-fetch)
  379. (uri (string-append "https://github.com/rzvncj/xCHM"
  380. "/releases/download/"
  381. version "/xchm-" version ".tar.gz"))
  382. (sha256
  383. (base32
  384. "0aw6bysqiwbw75n3ad229ihlmh7chqs1wlxm0398z3lfp2y6n7qf"))))
  385. (build-system gnu-build-system)
  386. (inputs
  387. `(("wxwidgets" ,wxwidgets)
  388. ("chmlib" ,chmlib)))
  389. (native-inputs
  390. `(("pkg-config" ,pkg-config)))
  391. (home-page "https://github.com/rzvncj/xCHM")
  392. (synopsis "CHM file viewer")
  393. (description "xCHM is a graphical CHM file viewer. It is a frontend to
  394. the CHM library CHMLIB.")
  395. (license license:gpl2+)))