* [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC)
@ 2018-09-11 12:23 Pjotr Prins
2018-09-12 8:50 ` Pjotr Prins
2018-09-13 12:55 ` Ricardo Wurmus
0 siblings, 2 replies; 6+ messages in thread
From: Pjotr Prins @ 2018-09-11 12:23 UTC (permalink / raw)
To: 32699
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
Attached a bunch of packages I wrote for RQDA. This is a particular
useful package because it depends on GTK2. guix import cran is pretty
awesome - it got most of it right :).
One or two hacks in there to disable X11 tests. Anyone any comments on
how to enable X11 instead of having X-headless? And is this good
enough to submit to Guix otherwise?
Pj.
[-- Attachment #2: r-qda.patch --]
[-- Type: text/x-diff, Size: 7007 bytes --]
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 04979ff..1c913a5 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -5715,3 +5715,188 @@ Java package that provides routines for various statistical distributions.")
;; are under the GPLv3, which is a mistake. The author confirmed in an
;; email that this whole project should be under GPLv2+.
(license license:gpl2+)))
+
+(define-public r-rgtk2
+ (package
+ (name "r-rgtk2")
+ (version "2.20.35")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "RGtk2" version))
+ (sha256
+ (base32
+ "17nxxhkk9jvcwfajbhs5kyrx00lx1irggfbq3l2gp28dvb1cn6z9"))))
+ (properties `((upstream-name . "RGtk2")))
+ (build-system r-build-system)
+ (inputs
+ `(("atk" ,atk)
+ ("cairo" ,cairo)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+-2)
+ ("pango" ,pango)))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (home-page "http://www.ggobi.org/rgtk2")
+ (synopsis "R Bindings for Gtk 2.8.0 and Above")
+ (description
+ "Facilities in the R language for programming graphical interfaces
+using Gtk, the Gimp Tool Kit.")
+ (license (list license:gpl2+ license:gpl3+))))
+
+(define-public r-cairodevice
+ (package
+ (name "r-cairodevice")
+ (version "2.25")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "cairoDevice" version))
+ (sha256
+ (base32
+ "0qsg6niz6b67yiqp200mi894s615y2bp0vb2sc093l9x9bc2jvfj"))))
+ (properties `((upstream-name . "cairoDevice")))
+ (build-system r-build-system)
+ (inputs `(("cairo" ,cairo)
+ ("gtk+" ,gtk+-2)
+ ))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:tests? #f ;; requires running X11
+ #:configure-flags (list "--no-build-vignettes" "--no-test-load")
+ ))
+ (home-page
+ "http://cran.r-project.org/web/packages/cairoDevice")
+ (synopsis
+ "Embeddable Cairo Graphics Device Driver")
+ (description
+ "This device uses Cairo and GTK to draw to the screen, file (png,
+svg, pdf, and ps) or memory (arbitrary GdkDrawable or Cairo context).
+The screen device may be embedded into RGtk2 interfaces and supports
+all interactive features of other graphics devices, including
+getGraphicsEvent().")
+ (license (list license:gpl2+ license:gpl3+))))
+
+(define-public r-gwidgets
+ (package
+ (name "r-gwidgets")
+ (version "0.0-54")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "gWidgets" version))
+ (sha256
+ (base32
+ "13lbbbnmkvb559klgsnz0q27qlyv102xakb6yccxsxjw249hm8c2"))))
+ (properties `((upstream-name . "gWidgets")))
+ (build-system r-build-system)
+ (home-page
+ "https://r-forge.r-project.org/R/?group_id=761")
+ (synopsis
+ "gWidgets API for building toolkit-independent, interactive GUIs")
+ (description
+ "gWidgets provides a toolkit-independent API for building
+interactive GUIs. At least one of the 'gWidgetsXXX packages', such as
+gWidgetstcltk, needs to be installed. Some icons are on loan from the
+scigraphica project http://scigraphica.sourceforge.net.")
+ (license license:gpl2+)))
+
+(define-public r-gwidgetsrgtk2
+ (package
+ (name "r-gwidgetsrgtk2")
+ (version "0.0-86")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "gWidgetsRGtk2" version))
+ (sha256
+ (base32
+ "0b1xqffbzxlaaaqf1vzfl0a7b6wnnslsp8v5fbxblv7w951rsc4m"))))
+ (properties `((upstream-name . "gWidgetsRGtk2")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-cairodevice" ,r-cairodevice)
+ ("r-gwidgets" ,r-gwidgets)
+ ("r-rgtk2" ,r-rgtk2)))
+ (arguments
+ `(#:tests? #f ;; requires running X11
+ #:phases
+ (modify-phases %standard-phases
+ ;; we patch out cairoDevice because it requires X11
+ (add-before 'install 'patch-out-cairoDevice
+ (lambda _
+ (substitute* "DESCRIPTION"
+ ;; this got ignored by R (("LazyLoad: yes") "LazyLoad: no")
+ (("cairoDevice") "methods"))
+ (substitute* "NAMESPACE"
+ (("cairoDevice") "methods"))#t))
+ (delete 'check))))
+ (home-page
+ "http://cran.r-project.org/web/packages/gWidgetsRGtk2")
+ (synopsis
+ "Toolkit Implementation of gWidgets for RGtk2")
+ (description
+ "Port of the gWidgets API to the RGtk2 toolkit.")
+ (license license:gpl2+)))
+
+(define-public r-igraph
+ (package
+ (name "r-igraph")
+ (version "1.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "igraph" version))
+ (sha256
+ (base32
+ "1bggm7b8v3bh7q2589w26qvd7sgs69m4qiij7d0rbm0ykkgxm8lx"))))
+ (build-system r-build-system)
+ (inputs
+ `(("glpk" ,glpk)
+ ("gmp" ,gmp)
+ ("libxml2" ,libxml2)
+ ("zlib" ,zlib)))
+ (propagated-inputs
+ `(("r-magrittr" ,r-magrittr)
+ ("r-matrix" ,r-matrix)
+ ("r-pkgconfig" ,r-pkgconfig)))
+ (native-inputs `(("gfortran" ,gfortran)))
+ (home-page "http://igraph.org")
+ (synopsis "Network Analysis and Visualization")
+ (description
+ "Routines for simple graphs and network analysis. It can handle large graphs very well and provides functions for generating random and regular graphs, graph visualization, centrality methods and much more.")
+ (license license:gpl2+)))
+
+
+(define-public r-rqda
+ (let ((commit "3cd9abbbde590e1bf9c602b427ebd49e43b6b71a")
+ (revision "0.3-1"))
+ (package
+ (name "r-rqda")
+ (version (string-append "0-" revision "." (string-take commit 9)))
+ (source (origin
+ (method git-fetch) ;; git checkout because there are no recent releases
+ (uri (git-reference
+ (url "https://github.com/Ronggui/RQDA.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1s8ibwikmkdhvl5i0simmdh7pqn7ql1vc9d2kxam9f0k56kdpkhb"))))
+ (properties `((upstream-name . "RQDA")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-dbi" ,r-dbi)
+ ("r-gwidgets" ,r-gwidgets)
+ ("r-gwidgetsrgtk2" ,r-gwidgetsrgtk2)
+ ("r-igraph" ,r-igraph)
+ ("r-rgtk2" ,r-rgtk2)
+ ("r-rsqlite" ,r-rsqlite)))
+ (home-page "http://rqda.r-forge.r-project.org")
+ (synopsis "Qualitative Data Analysis")
+ (description
+ "Software for qualitative text analysis (Kuckartz, 2014,
+<doi:10.4135/9781446288719>). Current version only supports plain
+text, but it can import PDF highlights if package
+'rjpod' (<https://r-forge.r-project.org/projects/rqda/>) is
+installed.")
+ (license license:bsd-3))))
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC)
2018-09-11 12:23 [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC) Pjotr Prins
@ 2018-09-12 8:50 ` Pjotr Prins
2018-09-13 12:55 ` Ricardo Wurmus
1 sibling, 0 replies; 6+ messages in thread
From: Pjotr Prins @ 2018-09-12 8:50 UTC (permalink / raw)
To: 32699
[-- Attachment #1: Type: text/plain, Size: 136 bytes --]
Added another patch for text mining with R tm.
I would appreciate some feedback on the previous patch before I start
submitting.
Pj.
[-- Attachment #2: tm.patch --]
[-- Type: text/x-diff, Size: 1740 bytes --]
commit b9a90ec3a768b99e112fbfa76e511252fef78fdd
Author: Pjotr Prins <pjotr.public01@thebird.nl>
Date: Tue Sep 11 14:36:38 2018 +0000
added r-tm
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 1c913a5..4e9244b 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -5900,3 +5900,48 @@ text, but it can import PDF highlights if package
'rjpod' (<https://r-forge.r-project.org/projects/rqda/>) is
installed.")
(license license:bsd-3))))
+
+(define-public r-nlp
+ (package
+ (name "r-nlp")
+ (version "0.1-11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "NLP" version))
+ (sha256
+ (base32
+ "15v50gxzmpqx49wzkwxfpb5xjpg9y829a0ifys372kf1cfj521aq"))))
+ (properties `((upstream-name . "NLP")))
+ (build-system r-build-system)
+ (home-page
+ "http://cran.r-project.org/web/packages/NLP")
+ (synopsis
+ "Natural Language Processing Infrastructure")
+ (description
+ "Basic classes and methods for Natural Language Processing.")
+ (license license:gpl3)))
+
+(define-public r-tm
+ (package
+ (name "r-tm")
+ (version "0.7-5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "tm" version))
+ (sha256
+ (base32
+ "05x3kj6dxffcfyn42q2fw9bby5f4wdmslc3ww1dl0r09pz950cax"))))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-bh" ,r-bh)
+ ("r-nlp" ,r-nlp)
+ ("r-rcpp" ,r-rcpp)
+ ("r-slam" ,r-slam)
+ ("r-xml2" ,r-xml2)))
+ (home-page "http://tm.r-forge.r-project.org/")
+ (synopsis "Text Mining Package")
+ (description
+ "This package provides a framework for text mining applications within R.")
+ (license license:gpl3)))
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC)
2018-09-11 12:23 [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC) Pjotr Prins
2018-09-12 8:50 ` Pjotr Prins
@ 2018-09-13 12:55 ` Ricardo Wurmus
2022-03-23 15:45 ` zimoun
1 sibling, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2018-09-13 12:55 UTC (permalink / raw)
To: 32699
Hi Pjotr,
thanks for the patches!
I’m glad that you found the recursive importer helpful. Unfortunately,
it doesn’t do a great job with licenses: some of the packages have a
list of GPLv2+ and GPLv3+. Sometimes this is really just a CRAN
expansion for “GPLv2 or later”, other times it means that different
parts of the package are under different licenses.
Could you please check what the license list means for r-rgtk2 and
r-cairodevice? In some cases we can replace the list with a single
license; in other cases we add a comment above the license field to
state what it really means.
Generally, I would recommend putting these packages in (gnu packages
cran) instead of (gnu packages statistics). I’ve been moving packages
from statistics.scm to cran.scm to avoid circular dependencies between
modules.
Here some more comments and questions about the patches:
* the importer unfortunately still defaults to generating HTTP URLs for
the home page instead of HTTPS. It also fails to add a trailing slash
for cran.r-project.org URLs. Could you please add them? (This keeps
the linter happy.)
* the description of many R packages on CRAN don’t use full sentences,
whereas for Guix we’d like to use complete sentences. The easiest way
to fix this is to add “This package provides” to the beginning of the
package description from CRAN. (The importer does this automatically,
when the description begins with “A ”, but it can’t easily guess other
instances where this would be appropriate.)
* the synopses of R packages from CRAN often use … “creative” letter
casing. Instead of, say, “R Bindings for Gtk 2.8.0 and Above” we
would use “R bindings for Gtk 2.8.0 and above”. (I don’t know how to
let the importer do the right thing automatically.)
* for r-cairodevice we might be able to run the tests after setting up
an X server in a pre-check build phase. We would need to add
("xorg-server" ,xorg-server) to the native inputs. Here’s an example
for the phase taken from the caja package:
--8<---------------cut here---------------start------------->8---
#:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda _
;; Tests require a running X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
;; For the missing /etc/machine-id.
(setenv "DBUS_FATAL_WARNINGS" "0")
#t)))
--8<---------------cut here---------------end--------------->8---
* the description in r-cairodevice includes references to code: we
would, for example, replace “arbitrary GdkDrawable or Cairo context”
with “arbitrary @code{GdkDrawable} or @code{Cairo} context”. Same
with “RGtk2” and “getGraphicsEvent()”.
* I would replace the description of “r-gwidgets” with this text:
"gWidgets provides a toolkit-independent API for building
interactive GUIs. At least one of the toolkit implementations for
a specific GUI backend (such as @code{gWidgetsRGtk2}) should be
installed."
* In r-gwidgetsrgtk2 we might be able to do without patching the
DESCRIPTION and NAMESPACE files by adding a pre-check phase as shown
above. Is there another reason for patching this file?
* I would change the r-gwidgetsrgtk2 description to this (taken from the
package documentation):
“This package allows the gWidgets API to use the RGtk2 package
allowing the use of the GTK libraries within R.”
* r-igraph already exists in (gnu packages graph).
* r-rqda uses sources from a git checkout, which means that you could
use git-specific helpers:
(version (git-version "0.3-1" revision commit))
…
(file-name (git-file-name name version))
Note that the revision is just a Guix-internal number (as a string)
starting at "1".
* r-nlp: the same applies as for other packages: please add it to
cran.scm, use HTTPS and a trailing slash for the home-page field, use
lower case for the synopsis, and expand the description to a complete
sentence.
* r-tm looks fine to me.
To generate patches more easily you can create one local commit per
package and then use git format-patch -5 to create 5 patch files for the
last 5 commits. We usually apply one patch per package.
--
Ricardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC)
2018-09-13 12:55 ` Ricardo Wurmus
@ 2022-03-23 15:45 ` zimoun
2022-05-06 11:26 ` [bug#32699] [ext] Re: bug#32699: " Ricardo Wurmus
0 siblings, 1 reply; 6+ messages in thread
From: zimoun @ 2022-03-23 15:45 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 32699
Hi Ricardo,
Digging this old patch [1], well considering that running now “guix
import cran -r” for the second submission:
+ (name "r-nlp“)
+ (version "0.1-11")
+ (name "r-tm")
+ (version "0.7-5")
the result is:
(name "r-nlp")
(version "0.2-1")
(name "r-tm")
(version "0.7-8")
For the others:
+(define-public r-rgtk2
+ (package
+ (name "r-rgtk2")
+ (version "2.20.35")
Not in CRAN anymore.
+(define-public r-cairodevice
+ (package
+ (name "r-cairodevice")
+ (version "2.25")
Not in CRAN anymore.
+(define-public r-gwidgets
+ (package
+ (name "r-gwidgets")
+ (version "0.0-54")
Not in CRAN anymore.
+(define-public r-gwidgetsrgtk2
+ (package
+ (name "r-gwidgetsrgtk2")
+ (version "0.0-86")
Not in CRAN anymore.
+(define-public r-igraph
+ (package
+ (name "r-igraph")
+ (version "1.2.2")
Current Guix:
name: r-igraph
version: 1.2.11
+(define-public r-rqda
+ (let ((commit "3cd9abbbde590e1bf9c602b427ebd49e43b6b71a")
+ (revision "0.3-1"))
+ (package
Not in CRAN anymore.
On Thu, 13 Sep 2018 at 14:55, Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> wrote:
> Here some more comments and questions about the patches:
[...]
> To generate patches more easily you can create one local commit per
> package and then use git format-patch -5 to create 5 patch files for the
> last 5 commits. We usually apply one patch per package.
Reading your comments, I propose therefore to drop this patch in favor
of another recent submission one (I or you if you beat me :-)) could do
later after this email.
WDYT?
1: <http://issues.guix.gnu.org/issue/32699>
Cheers,
simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#32699] [ext] Re: bug#32699: Adding r-gtk2 and other packages for r-qda (RFC)
2022-03-23 15:45 ` zimoun
@ 2022-05-06 11:26 ` Ricardo Wurmus
2023-11-07 14:22 ` Clément Lassieur
0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2022-05-06 11:26 UTC (permalink / raw)
To: zimoun; +Cc: 32699
zimoun <zimon.toutoune@gmail.com> writes:
> Reading your comments, I propose therefore to drop this patch in favor
> of another recent submission one (I or you if you beat me :-)) could do
> later after this email.
>
>
> WDYT?
Sounds good.
--
Ricardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32699: Adding r-gtk2 and other packages for r-qda (RFC)
2022-05-06 11:26 ` [bug#32699] [ext] Re: bug#32699: " Ricardo Wurmus
@ 2023-11-07 14:22 ` Clément Lassieur
0 siblings, 0 replies; 6+ messages in thread
From: Clément Lassieur @ 2023-11-07 14:22 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 32699-done, zimoun
On Fri, May 06 2022, Ricardo Wurmus wrote:
> zimoun <zimon.toutoune@gmail.com> writes:
>
>> Reading your comments, I propose therefore to drop this patch in favor
>> of another recent submission one (I or you if you beat me :-)) could do
>> later after this email.
>>
>>
>> WDYT?
>
> Sounds good.
Hi, closing since r-nlp, r-tm and r-igraph are already packaged.
Cheers,
Clément
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-07 14:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11 12:23 [bug#32699] Adding r-gtk2 and other packages for r-qda (RFC) Pjotr Prins
2018-09-12 8:50 ` Pjotr Prins
2018-09-13 12:55 ` Ricardo Wurmus
2022-03-23 15:45 ` zimoun
2022-05-06 11:26 ` [bug#32699] [ext] Re: bug#32699: " Ricardo Wurmus
2023-11-07 14:22 ` Clément Lassieur
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).