[PATCH 0/2] r-haven: Unvendor readstat

OpenSubmitted by Lars-Dominik Braun.
Details
One participant
  • Lars-Dominik Braun
Owner
unassigned
Severity
normal
L
L
Lars-Dominik Braun wrote 3 days ago
(address . guix-patches@gnu.org)
YDT9bv1yvXluUI6Z@noor.fritz.box
I rebuilt all packages depending on r-haven and tried loading examplefiles using r-haven’s read_* functions. There are no apparentmodifications to the vendored source, based on a look athttps://github.com/tidyverse/haven/commits/v2.3.1/src/readstatbut it’s not quite clear which version they are using. Probably a gitsnapshot.
Lars-Dominik Braun (2): gnu: Add readstat. gnu: r-haven: Unvendor readstat.
gnu/packages/cran.scm | 19 +++++++++++++++++-- gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-)
-- 2.26.2
L
L
Lars-Dominik Braun wrote 3 days ago
[PATCH 1/2] gnu: Add readstat.
(address . 46717@debbugs.gnu.org)
YDT96+HDsf8VU5L4@noor.fritz.box
* gnu/packages/statistics.scm (readstat): New variable.--- gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
Toggle diff (38 lines)diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scmindex 3821c86da9..be30fa712c 100644--- a/gnu/packages/statistics.scm+++ b/gnu/packages/statistics.scm@@ -5904,3 +5904,31 @@ Java package that provides routines for various statistical distributions.") is designed to support editing of scripts and interaction with various statistical analysis programs such as R, Julia, and JAGS.") (license license:gpl3+))))++(define-public readstat+ (package+ (name "readstat")+ (version "1.1.5")+ (source+ (origin+ (method git-fetch)+ (uri (git-reference+ (url "https://github.com/WizardMac/ReadStat.git")+ (commit (string-append "v" version))))+ (file-name (git-file-name name version))+ (sha256+ (base32 "00sdmaq0qzp6kyv53fpfi6jf3iv4pd0ap0gmw3mbfip52bbnl55w"))))+ (build-system gnu-build-system)+ (native-inputs+ `(("autoconf" ,autoconf)+ ("automake" ,automake)+ ("gettext" ,gnu-gettext)+ ("libtool" ,libtool)))+ (inputs+ `(("zlib" ,zlib))) ; libz+ (synopsis "Convert SAS, Stata, and SPSS files")+ (description "Command-line tool and C library for reading files from+popular stats packages like SAS, Stata and SPSS.")+ (home-page "https://github.com/WizardMac/ReadStat")+ (license license:expat)))+-- 2.26.2
L
L
Lars-Dominik Braun wrote 3 days ago
[PATCH 2/2] gnu: r-haven: Unvendor readstat.
(address . 46717@debbugs.gnu.org)
YDT+Al0e3i0+lk7R@noor.fritz.box
* gnu/packages/cran.scm (r-haven) [snippet]: Remove bundled readstat.[arguments]: Patch Makevars to use system readstat.[inputs]: Replace zlib with readstat.--- gnu/packages/cran.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
Toggle diff (34 lines)diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scmindex 4a88cf1677..d675b7e37a 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-- 2.26.2
?