summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2021-02-23 14:07:14 +0100
committerLudovic Courtès <ludo@gnu.org>2021-03-02 23:12:35 +0100
commit2075b83b2dbd9896e2e69070e3363f3d43fbe133 (patch)
tree2cf92b5d0e1a9bc309aa8fe7bf91143eeabc0d0b
parent5ca1c7d1ce86a8d4737996d3a0f7288db7f60852 (diff)
gnu: r-haven: Unvendor readstat.
* gnu/packages/cran.scm (r-haven) [snippet]: Remove bundled readstat. [arguments]: Patch Makevars to use system readstat. [inputs]: Replace zlib with readstat. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/cran.scm19
1 files changed, 17 insertions, 2 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index baf8e08f86..1d574b9768 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -2309,10 +2309,25 @@ including functions for geolocation and routing.")
(uri (cran-uri "haven" version))
(sha256
(base32
- "03cypgqhdkrfbfpl1yx2wb7flczrbak1w654wkicmd5ajwr9zvkf"))))
+ "03cypgqhdkrfbfpl1yx2wb7flczrbak1w654wkicmd5ajwr9zvkf"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; unvendor readstat
+ (delete-file-recursively "src/readstat")
+ #t))))
(build-system r-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unbundle-readstat
+ (lambda _
+ ;; Not required, since we’re not building readstat.
+ (substitute* "src/Makevars"
+ (("-lz") "-lreadstat"))
+ #t)))))
(inputs
- `(("zlib" ,zlib)))
+ `(("readstat" ,readstat)))
(native-inputs
`(("r-knitr" ,r-knitr)))
(propagated-inputs