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>
This commit is contained in:
Lars-Dominik Braun 2021-02-23 14:07:14 +01:00 committed by Ludovic Courtès
parent 5ca1c7d1ce
commit 2075b83b2d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2309,10 +2309,25 @@ (define-public r-haven
(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 were not building readstat.
(substitute* "src/Makevars"
(("-lz") "-lreadstat"))
#t)))))
(inputs
`(("zlib" ,zlib)))
`(("readstat" ,readstat)))
(native-inputs
`(("r-knitr" ,r-knitr)))
(propagated-inputs