* [bug#46717] [PATCH 1/2] gnu: Add readstat.
2021-02-23 13:04 [bug#46717] [PATCH 0/2] r-haven: Unvendor readstat Lars-Dominik Braun
@ 2021-02-23 13:06 ` Lars-Dominik Braun
2021-02-23 13:07 ` [bug#46717] [PATCH 2/2] gnu: r-haven: Unvendor readstat Lars-Dominik Braun
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Lars-Dominik Braun @ 2021-02-23 13:06 UTC (permalink / raw)
To: 46717
* gnu/packages/statistics.scm (readstat): New variable.
---
gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#46717] [PATCH 2/2] gnu: r-haven: Unvendor readstat.
2021-02-23 13:04 [bug#46717] [PATCH 0/2] r-haven: Unvendor readstat Lars-Dominik Braun
2021-02-23 13:06 ` [bug#46717] [PATCH 1/2] gnu: Add readstat Lars-Dominik Braun
@ 2021-02-23 13:07 ` Lars-Dominik Braun
2021-03-02 19:32 ` bug#46717: [PATCH 0/2] " Ludovic Courtès
2021-03-05 11:57 ` [bug#46717] " Ludovic Courtès
3 siblings, 0 replies; 5+ messages in thread
From: Lars-Dominik Braun @ 2021-02-23 13:07 UTC (permalink / raw)
To: 46717
* 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(-)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#46717: [PATCH 0/2] r-haven: Unvendor readstat
2021-02-23 13:04 [bug#46717] [PATCH 0/2] r-haven: Unvendor readstat Lars-Dominik Braun
2021-02-23 13:06 ` [bug#46717] [PATCH 1/2] gnu: Add readstat Lars-Dominik Braun
2021-02-23 13:07 ` [bug#46717] [PATCH 2/2] gnu: r-haven: Unvendor readstat Lars-Dominik Braun
@ 2021-03-02 19:32 ` Ludovic Courtès
2021-03-05 11:57 ` [bug#46717] " Ludovic Courtès
3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-03-02 19:32 UTC (permalink / raw)
To: Lars-Dominik Braun; +Cc: 46717-done
Hi,
Lars-Dominik Braun <lars@6xq.net> skribis:
> I rebuilt all packages depending on r-haven and tried loading example
> files using r-haven’s read_* functions. There are no apparent
> modifications to the vendored source, based on a look at
> https://github.com/tidyverse/haven/commits/v2.3.1/src/readstat
> but it’s not quite clear which version they are using. Probably a git
> snapshot.
>
> Lars-Dominik Braun (2):
> gnu: Add readstat.
> gnu: r-haven: Unvendor readstat.
Applied both, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#46717] [PATCH 0/2] r-haven: Unvendor readstat
2021-02-23 13:04 [bug#46717] [PATCH 0/2] r-haven: Unvendor readstat Lars-Dominik Braun
` (2 preceding siblings ...)
2021-03-02 19:32 ` bug#46717: [PATCH 0/2] " Ludovic Courtès
@ 2021-03-05 11:57 ` Ludovic Courtès
3 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-03-05 11:57 UTC (permalink / raw)
To: Lars-Dominik Braun; +Cc: 46717-done
Hi,
Lars-Dominik Braun <lars@6xq.net> skribis:
> I rebuilt all packages depending on r-haven and tried loading example
> files using r-haven’s read_* functions. There are no apparent
> modifications to the vendored source, based on a look at
> https://github.com/tidyverse/haven/commits/v2.3.1/src/readstat
> but it’s not quite clear which version they are using. Probably a git
> snapshot.
>
> Lars-Dominik Braun (2):
> gnu: Add readstat.
> gnu: r-haven: Unvendor readstat.
LGTM! Pushed a couple of days ago as
2075b83b2dbd9896e2e69070e3363f3d43fbe133.
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread