aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLars-Dominik Braun <ldb@leibniz-psychology.org>2021-03-15 10:19:00 +0100
committerLars-Dominik Braun <ldb@leibniz-psychology.org>2021-03-15 10:53:10 +0100
commit52c70fb66ea82c8c4bbc555c361a42ebd839941c (patch)
tree0a48a03a3dd76b86647a4613473906dd7698444e /gnu
parent03af89bd9efaeac35490b75fffb598dde302df12 (diff)
downloadguix-52c70fb66ea82c8c4bbc555c361a42ebd839941c.tar.gz
guix-52c70fb66ea82c8c4bbc555c361a42ebd839941c.zip
gnu: Add r-qpdf.
Cannot add to (gnu packages pdf) due to circular module dependency. * gnu/packages/cran.scm (r-qpdf): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cran.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index b6ee33170d..877396b996 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -91,6 +91,7 @@
#:use-module (gnu packages networking)
#:use-module (gnu packages node)
#:use-module (gnu packages pcre)
+ #:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio) ;libsndfile
@@ -27668,3 +27669,49 @@ user streams, and to parse the output into data frames.")
"Import @dfn{OpenDocument Spreadsheet} (ODS) into R as a data frame.
Also support writing data frame into ODS file.")
(license license:gpl3)))
+
+(define-public r-qpdf
+ (package
+ (name "r-qpdf")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "qpdf" version))
+ (sha256
+ (base32
+ "03lnfncw8qd1fwfyqh1mjvnsjr3b63wxbah0wp5g7z7gba90dwbi"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; unvendor libqpdf
+ (delete-file-recursively "src/libqpdf")
+ (delete-file-recursively "src/include/qpdf")
+ #t))))
+ (properties `((upstream-name . "qpdf")))
+ (build-system r-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda _
+ (setenv "EXTERNAL_QPDF" "1")
+ #t)))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("qpdf" ,qpdf)))
+ (propagated-inputs
+ `(("r-askpass" ,r-askpass)
+ ("r-curl" ,r-curl)
+ ("r-rcpp" ,r-rcpp)))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/ropensci/qpdf")
+ (synopsis
+ "Split, Combine and Compress PDF Files")
+ (description
+ "Content-preserving transformations transformations of PDF files such as
+split, combine, and compress. This package interfaces directly to the
+@code{qpdf} C++ API and does not require any command line utilities. Note that
+@code{qpdf} does not read actual content from PDF files: to extract text and
+data you need the @code{pdftools} package.")
+ (license license:asl2.0)))