gnu: Add emacs-sbt-mode.
[jackhill/guix/guix.git] / gnu / packages / pdf.scm
index 32a45ed..4c11111 100644 (file)
@@ -4,8 +4,8 @@
 ;;; Copyright © 2014, 2015, 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016 ng0 <ng0@n0.is>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Nikita <nikita@n0.is>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
@@ -16,7 +16,8 @@
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Ben Sturmfels <ben@sturm.com.au>
-;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
@@ -55,6 +57,7 @@
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages game-development)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
@@ -74,6 +77,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages photo)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tex)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public flyer-composer
+  (package
+    (name "flyer-composer")
+    (version "1.0rc2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flyer-composer" version))
+       (sha256
+        (base32 "17igqb5dlcgcq4nimjw6cf9qgz6a728zdx1d0rr90r2z0llcchsv"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ;; TODO
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (qtbase (assoc-ref inputs "qtbase"))
+                    (qml "/lib/qt5/qml"))
+               (wrap-program (string-append out "/bin/flyer-composer-gui")
+                 `("QT_PLUGIN_PATH" ":" =
+                   (,(string-append qtbase "/lib/qt5/plugins")))
+                 `("QT_QPA_PLATFORM_PLUGIN_PATH" ":" =
+                   (,(string-append qtbase "/lib/qt5/plugins/platforms"))))
+               #t))))))
+    (inputs
+     `(("python-pypdf2" ,python-pypdf2)
+       ("python-pyqt" ,python-pyqt)
+       ("python-poppler-qt5" ,python-poppler-qt5)
+       ("qtbase" ,qtbase)))
+    (home-page "http://crazy-compilers.com/flyer-composer")
+    (synopsis "Rearrange PDF pages to print as flyers on one sheet")
+    (description "@command{flyer-composer} can be used to prepare one- or
+two-sided flyers for printing on one sheet of paper.
+
+Imagine you have designed a flyer in A6 format and want to print it using your
+A4 printer.  Of course, you want to print four flyers on each sheet.  This is
+where Flyer Composer steps in, creating a PDF which holds your flyer four
+times.  If you have a second page, Flyer Composer can arrange it the same way
+- even if the second page is in a separate PDF file.
+
+This package contains both the command line tool and the gui too.")
+    (license license:agpl3+)))
+
+(define-public flyer-composer-cli
+  (package/inherit flyer-composer
+    (name "flyer-composer-cli")
+    (arguments
+     `(#:tests? #f ;; TODO
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-gui
+           (lambda _
+             (delete-file-recursively "flyer_composer/gui")
+             (substitute* "setup.cfg"
+               (("^\\s+flyer-composer-gui\\s*=.*") ""))
+             #t)))))
+    (inputs
+     `(("python-pypdf2" ,python-pypdf2)))
+    (description "@command{flyer-composer} can be used to prepare one- or
+two-sided flyers for printing on one sheet of paper.
+
+Imagine you have designed a flyer in A6 format and want to print it using your
+A4 printer.  Of course, you want to print four flyers on each sheet.  This is
+where Flyer Composer steps in, creating a PDF which holds your flyer four
+times.  If you have a second page, Flyer Composer can arrange it the same way
+- even if the second page is in a separate PDF file.
+
+This package contains only the command line tool.  If you like to use the gui,
+please install the @code{flyer-composer-gui} package.")))
+
 (define-public poppler
   (package
    (name "poppler")
-   (version "0.84.0")
+   (version "0.86.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://poppler.freedesktop.org/poppler-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0ccp2gx05cz5y04k5pgbyi4ikyq60nafa7x2yx4aaf1vfkd318f7"))))
+              "0v3z4mk1rr8i0c4cfkab7pnxdbil30j4cm4w6cqlq6cfghkhlqxg"))))
    (build-system cmake-build-system)
    ;; FIXME:
    ;;  use libcurl:        no
@@ -220,7 +298,7 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.")
        ("python-pyqt" ,python-pyqt)
        ("poppler-qt5" ,poppler-qt5)
        ("qtbase" ,qtbase)))
-    (home-page "https://pypi.python.org/pypi/python-poppler-qt5")
+    (home-page "https://pypi.org/project/python-poppler-qt5/")
     (synopsis "Python bindings for Poppler-Qt5")
     (description
      "This package provides Python bindings for the Qt5 interface of the
@@ -234,7 +312,7 @@ Poppler PDF rendering library.")
    (source (origin
              (method git-fetch)
              (uri (git-reference
-                   (url "https://github.com/libharu/libharu.git")
+                   (url "https://github.com/libharu/libharu")
                    (commit (string-append
                             "RELEASE_"
                             (string-join (string-split version #\.) "_")))))
@@ -266,13 +344,14 @@ reading and editing of existing PDF files.")
 (define-public xpdf
   (package
    (name "xpdf")
-   (version "3.04")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
-                                version ".tar.gz"))
-            (sha256 (base32
-                     "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
+   (version "4.02")
+   (source
+    (origin
+      (method url-fetch)
+      (uri (string-append "https://xpdfreader-dl.s3.amazonaws.com/xpdf-"
+                          version "4.02.tar.gz"))
+      (sha256
+       (base32 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
    (build-system gnu-build-system)
    (inputs `(("freetype" ,freetype)
              ("gs-fonts" ,gs-fonts)
@@ -286,8 +365,8 @@ reading and editing of existing PDF files.")
              ("libpng" ,libpng)
              ("zlib" ,zlib)))
    (arguments
-    `(#:tests? #f ; there is no check target
-      #:parallel-build? #f ; build fails randomly on 8-way machines
+    `(#:tests? #f                     ; there is no check target
+      #:parallel-build? #f            ; build fails randomly on 8-way machines
       #:configure-flags
         (list (string-append "--with-freetype2-includes="
                              (assoc-ref %build-inputs "freetype")
@@ -309,8 +388,8 @@ reading and editing of existing PDF files.")
    (synopsis "Viewer for PDF files based on the Motif toolkit")
    (description
     "Xpdf is a viewer for Portable Document Format (PDF) files.")
-   (license license:gpl3) ; or gpl2, but not gpl2+
-   (home-page "http://www.foolabs.com/xpdf/")))
+   (license license:gpl3)             ; or gpl2, but not gpl2+
+   (home-page "https://www.xpdfreader.com/")))
 
 (define-public zathura-cb
   (package
@@ -385,7 +464,7 @@ using libspectre.")
 (define-public zathura-djvu
   (package
     (name "zathura-djvu")
-    (version "0.2.8")
+    (version "0.2.9")
     (source (origin
               (method url-fetch)
               (uri
@@ -393,7 +472,7 @@ using libspectre.")
                               version ".tar.xz"))
               (sha256
                (base32
-                "0axkv1crdxn0z44whaqp2ibkdqcykhjnxk7qzms0dp1b67an9rnh"))))
+                "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
      `(("djvulibre" ,djvulibre)
@@ -433,7 +512,7 @@ using the DjVuLibre library.")
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
      `(("jbig2dec" ,jbig2dec)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("mujs" ,mujs)
        ("mupdf" ,mupdf)
        ("openjpeg" ,openjpeg)
@@ -465,7 +544,7 @@ by using the @code{mupdf} rendering library.")
 (define-public zathura-pdf-poppler
   (package
     (name "zathura-pdf-poppler")
-    (version "0.2.9")
+    (version "0.3.0")
     (source (origin
               (method url-fetch)
               (uri
@@ -473,7 +552,7 @@ by using the @code{mupdf} rendering library.")
                               version ".tar.xz"))
               (sha256
                (base32
-                "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y"))))
+                "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
      `(("poppler" ,poppler)
@@ -501,7 +580,7 @@ by using the poppler rendering engine.")
 (define-public zathura
   (package
     (name "zathura")
-    (version "0.4.3")
+    (version "0.4.5")
     (source (origin
               (method url-fetch)
               (uri
@@ -509,7 +588,7 @@ by using the poppler rendering engine.")
                               version ".tar.xz"))
               (sha256
                (base32
-                "0hgx5x09i6d0z45llzdmh4l348fxh1y102sb1w76f2fp4r21j4ky"))))
+                "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("gettext" ,gettext-minimal)
                      ("glib:bin" ,glib "bin")
@@ -573,7 +652,7 @@ interaction.")
      `(("cppunit" ,cppunit)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("libjpeg" ,libjpeg)
+     `(("libjpeg" ,libjpeg-turbo)
        ("libtiff" ,libtiff)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
@@ -611,7 +690,7 @@ extracting content or merging files.")
       (origin
         (method url-fetch)
         (uri (string-append "https://mupdf.com/downloads/archive/"
-                            name "-" version "-source.tar.xz"))
+                            "mupdf-" version "-source.tar.xz"))
         (sha256
          (base32
           "1npmy92lkj41nnc14b4fpq7z62pminy94zsdbrczj22jpn283rvg"))
@@ -632,7 +711,7 @@ extracting content or merging files.")
         ("freetype" ,freetype)
         ("harfbuzz" ,harfbuzz)
         ("jbig2dec" ,jbig2dec)
-        ("libjpeg" ,libjpeg)
+        ("libjpeg" ,libjpeg-turbo)
         ("libx11" ,libx11)
         ("libxext" ,libxext)
         ("mujs" ,mujs)
@@ -670,26 +749,14 @@ line tools for batch rendering @command{pdfdraw}, rewriting files
 (define-public qpdf
   (package
    (name "qpdf")
-   (version "9.1.0")
+   (version "10.0.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
                                 "/qpdf-" version ".tar.gz"))
             (sha256
              (base32
-              "0ygd80wxcmh613n04x2kmf8wlsl0drxyd5wwdcrm1rzj0xwvpfrs"))
-            (modules '((guix build utils)))
-            (snippet
-             ;; Replace shebang with the bi-lingual shell/Perl trick to remove
-             ;; dependency on Perl.
-             '(begin
-                (substitute* "qpdf/fix-qdf"
-                  (("#!/usr/bin/env perl")
-                   "\
-eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
-  & eval 'exec perl -wS \"$0\" $argv:q'
-    if 0;\n"))
-                #t))))
+              "0yw2cpw7ygfd6jlgpwbi8vsnvv9p55zxp9h17x77z2qq733pf8jx"))))
    (build-system gnu-build-system)
    (arguments
     `(#:disallowed-references (,perl)
@@ -752,23 +819,137 @@ program capable of converting PDF into other formats.")
 using a stylus.")
     (license license:gpl2+)))
 
+(define-public xournalpp
+  (package
+    (name "xournalpp")
+    (version "1.0.18")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/xournalpp/xournalpp")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a9ygbmd4dwgck3k8wsrm2grynqa0adb12wwspzmzvpisbadffjy"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags (list "-DENABLE_CPPUNIT=ON") ;enable tests
+       #:imported-modules ((guix build glib-or-gtk-build-system)
+                           ,@%cmake-build-system-modules)
+       #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  (guix build cmake-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-permissions-on-po-files
+           (lambda _
+             ;; Make sure 'msgmerge' can modify the PO files.
+             (for-each (lambda (po) (chmod po #o666))
+                       (find-files "." "\\.po$"))
+             #t))
+         ;; Fix path to addr2line utility, which the crash reporter uses.
+         (add-after 'unpack 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/util/Stacktrace.cpp"
+               ;; Match only the commandline.
+               (("\"addr2line ")
+                (string-append "\"" (which "addr2line") " ")))
+             #t))
+         (add-after 'install 'glib-or-gtk-wrap
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
+    (native-inputs
+     `(("cppunit" ,cppunit)
+       ("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("libsndfile" ,libsndfile)
+       ("libxml2" ,libxml2)
+       ("libzip" ,libzip)
+       ("lua" ,lua)                    ;FIXME: It cannot find the Lua library.
+       ("poppler" ,poppler)
+       ("portaudio" ,portaudio)
+       ("texlive-bin" ,texlive-bin)))
+    (home-page "https://github.com/xournalpp/xournalpp")
+    (synopsis "Handwriting notetaking software with PDF annotation support")
+    (description "Xournal++ is a hand note taking software written in
+C++ with the target of flexibility, functionality and speed.  Stroke
+recognizer and other parts are based on Xournal code.
+
+Xournal++ features:
+
+@itemize
+@item Support for Pen pressure, e.g., Wacom Tablet
+@item Support for annotating PDFs
+@item Fill shape functionality
+@item PDF Export (with and without paper style)
+@item PNG Export (with and without transparent background)
+@item Map different tools / colors etc. to stylus buttons /
+mouse buttons
+@item Sidebar with Page Previews with advanced page sorting, PDF
+Bookmarks and Layers (can be individually hidden, editing layer can be
+selected)
+@item enhanced support for image insertion
+@item Eraser with multiple configurations
+@item LaTeX support
+@item bug reporting, autosave, and auto backup tools
+@item Customizeable toolbar, with multiple configurations, e.g., to
+optimize toolbar for portrait / landscape
+@item Page Template definitions
+@item Shape drawing (line, arrow, circle, rectangle)
+@item Shape resizing and rotation
+@item Rotation snapping every 45 degrees
+@item Rect snapping to grid
+@item Audio recording and playback alongside with handwritten notes
+@item Multi Language Support, Like English, German, Italian...
+@item Plugins using LUA Scripting
+@end itemize")
+    (license license:gpl2+)))
+
 (define-public python-reportlab
   (package
     (name "python-reportlab")
-    (version "3.5.32")
+    (version "3.5.42")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "reportlab" version))
               (sha256
                (base32
-                "0lf8hil9nbm74zl27l8rydxbhwnpr0pbghibsqrc9sglds9l9vw3"))))
+                "0i17qgm7gzy7pzp240mkpsx9rn8rr67jh5npp5bylv3sd41g48cw"))))
     (build-system python-build-system)
     (arguments
-     '(;; FIXME: There is one test failure, but it does not cause the
-       ;; build to fail. No time to investigate right now.
-       #:test-target "tests"))
+     '(;; FIXME: There is one test failure, building the pdf manual from source,
+       ;; but it does not cause the build to fail.
+       #:test-target "tests"
+       #:configure-flags (list "--use-system-libart")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'find-libraries
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libart (assoc-ref inputs "libart-lgpl"))
+                   (freetype (assoc-ref inputs "freetype"))
+                   (dlt1 (assoc-ref inputs "font-curve-files")))
+               (substitute* "setup.py"
+                 (("/usr/include/libart-\\*")
+                  (string-append libart "/include/libart-2.0"))
+                 (("/usr/include/freetype2")
+                  (string-append freetype "/include"))
+                 (("http://www.reportlab.com/ftp/pfbfer-20180109.zip")
+                  (string-append "file://" dlt1)))
+               #t))))))
     (inputs
-     `(("freetype" ,freetype)))
+     `(("freetype" ,freetype)
+       ("libart-lgpl" ,libart-lgpl)
+       ("font-curve-files"
+        ,(origin
+           (method url-fetch)
+           (uri "http://www.reportlab.com/ftp/pfbfer-20180109.zip")
+           (sha256
+            (base32
+             "1v0gy4mbx02ys96ssx89420y0njknlrxs2bx64bv4rp8a0al66w5"))))))
     (propagated-inputs
      `(("python-pillow" ,python-pillow)))
     (home-page "https://www.reportlab.com")
@@ -859,7 +1040,7 @@ the PDF pages.")
         #:tests? #f
         #:make-flags (list "CC=gcc"
                            (string-append "prefix=" (assoc-ref %outputs "out")))))
-    (inputs `(("libjpeg" ,libjpeg)
+    (inputs `(("libjpeg" ,libjpeg-turbo)
               ("curl" ,curl)
               ("libtiff" ,libtiff)
               ("libudev" ,eudev)
@@ -891,7 +1072,7 @@ the framebuffer.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/dawbarton/pdf2svg.git")
+                    (url "https://github.com/dawbarton/pdf2svg")
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
@@ -988,7 +1169,7 @@ python-pypdf2 instead.")
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/jeromerobert/pdfarranger.git")
+             (url "https://github.com/jeromerobert/pdfarranger")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
@@ -1083,16 +1264,16 @@ multiple files.")
 (define-public pdfpc
   (package
     (name "pdfpc")
-    (version "4.3.4")
+    (version "4.4.0")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/pdfpc/pdfpc.git")
+             (url "https://github.com/pdfpc/pdfpc")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "07aafsm4jzdgpahz83p0ajv40hry7gviyadqi13ahr8xdhhwy2sd"))))
+        (base32 "0vh2r32akvasdrghkaq7ard24r2qncp34jfiyshi3zxabm9bhfaa"))))
     (build-system cmake-build-system)
     (arguments '(#:tests? #f))          ; no test target
     (inputs
@@ -1138,38 +1319,34 @@ presentation.  The input files processed by pdfpc are PDF documents.")
     (synopsis "Pango to PostScript converter")
     (description
      "Paps reads a UTF-8 encoded file and generates a PostScript language
-rendering of the file.  The rendering is done by creating outline curves
-through the Pango @code{ft2} backend.")
+rendering of the file through the Pango Cairo back end.")
     (license license:lgpl2.0+)))
 
 (define-public stapler
   (package
     (name "stapler")
-    (version "0.3.2")
+    (version "1.0.0")
     (source
      (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/hellerbarde/stapler")
-             (commit version)))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri (pypi-uri "stapler" version))
        (sha256
         (base32
-         "06w7xanzr7cicqik62g7zqs57j4y6fc7hflrc1rlmphxx40hkg6r"))))
+         "0b2lbm3f79cdxcsagwhzihbzwahjabxqmbws0c8ki25gpdnygdd7"))))
     (build-system python-build-system)
-    (inputs
-     `(("python2-pypdf2" ,python2-pypdf2)))
     (arguments
-     `(#:python ,python-2
-       #:phases
+     '(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'fix-pypdf-version-requirement
-           ;; A PyPDF2 version requirement of 1.25.1 is hard-coded in
-           ;; setup.py. Relax it to work with any version of PyPDF2.
+         (add-after 'unpack 'fix-more-itertools-version-requirement
            (lambda _
+             ;; Tests require an version of the more-itertools module older
+             ;; than the one we have packaged.
              (substitute* "setup.py"
-               (("PyPDF2==1.25.1") "PyPDF2"))
+               (("more-itertools>=2\\.2,<6\\.0\\.0") "more-itertools>=2.2"))
              #t)))))
+    (propagated-inputs
+     `(("python-more-itertools" ,python-more-itertools)
+       ("python-pypdf2" ,python-pypdf2)))
     (home-page "https://github.com/hellerbarde/stapler")
     (synopsis "PDF manipulation tool")
     (description "Stapler is a pure Python alternative to PDFtk, a tool for
@@ -1187,13 +1364,13 @@ manipulating PDF documents from the command line.  It supports
 (define-public weasyprint
   (package
     (name "weasyprint")
-    (version "50")
+    (version "51")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "WeasyPrint" version))
        (sha256
-        (base32 "0invs96zvmcr6wh5klj52jrcnr9qg150v9wpmbhcsf3vv1d1hbcw"))
+        (base32 "0skdzwq7cd715dnnds6abx0k0xmmnmsqp0vb1r1w20sg7abp3sdk"))
        (patches (search-patches "weasyprint-library-paths.patch"))))
     (build-system python-build-system)
     (arguments
@@ -1221,11 +1398,11 @@ manipulating PDF documents from the command line.  It supports
            (lambda _
              (substitute* "setup.cfg"
                ;; flake8 and isort syntax checks fail, which is not our
-               ;; business
+               ;; business.
                (("addopts = --flake8 --isort") ""))))
          (replace 'check
            (lambda _
-             ;; run pytest, excluding one failing test
+             ;; Run pytest, excluding one failing test.
              (invoke "pytest" "-k" "not test_flex_column_wrap_reverse"))))))
     (inputs
      `(("fontconfig" ,fontconfig)