aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-30 12:17:33 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-03-30 12:17:33 +0200
commitae0badf5bb791428423a98d4e4e2b8d297a5d4be (patch)
tree4282d243db3e90839a5f7d3b5878674ccd0e2e14 /gnu/packages/pdf.scm
parentee401ed9249fbe284ef1b9b437d39207ca88131b (diff)
parent927f3655662b41f25225ea03baa3ded687aa7cbb (diff)
downloadguix-ae0badf5bb791428423a98d4e4e2b8d297a5d4be.tar
guix-ae0badf5bb791428423a98d4e4e2b8d297a5d4be.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/guile.scm gnu/packages/linux.scm gnu/packages/package-management.scm gnu/packages/pulseaudio.scm gnu/packages/web.scm
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm74
1 files changed, 73 insertions, 1 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 700968d60a..d565f0dd46 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -16,7 +16,7 @@
;;; 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.
@@ -93,6 +93,78 @@
#: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 commnd 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 commnd line tool. If you like to use the gui,
+please install the @code{flyer-composer-gui} package.")))
+
(define-public poppler
(package
(name "poppler")