Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / rdf.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015, 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
6 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages rdf)
24 #:use-module ((guix licenses)
25 #:select (non-copyleft asl2.0 isc gpl2 lgpl2.1 lgpl2.1+ lgpl3+))
26 #:use-module (guix packages)
27 #:use-module (guix git-download)
28 #:use-module (guix download)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python)
32 #:use-module (guix build-system waf)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages boost)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages cyrus-sasl)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages dbm)
42 #:use-module (gnu packages gnupg)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages pcre)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages python-web)
50 #:use-module (gnu packages python-xyz)
51 #:use-module (gnu packages qt)
52 #:use-module (gnu packages time)
53 #:use-module (gnu packages tls)
54 #:use-module (gnu packages xml))
55
56 (define-public raptor2
57 (package
58 (name "raptor2")
59 (version "2.0.15")
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "http://download.librdf.org/source/" name
63 "-" version ".tar.gz"))
64 (patches
65 (search-patches "raptor2-heap-overflow.patch"))
66 (sha256
67 (base32
68 "1vc02im4mpc28zxzgli68k6j0dakh0k3s389bm436yvqajxg19xd"))))
69 (build-system gnu-build-system)
70 (inputs
71 `(("curl" ,curl)
72 ("libxml2" ,libxml2)
73 ("libxslt" ,libxslt)
74 ("zlib" ,zlib)))
75 (arguments
76 `(#:parallel-tests? #f))
77 (home-page "http://librdf.org/raptor/")
78 (synopsis "RDF syntax library")
79 (description "Raptor is a C library providing a set of parsers and
80 serialisers that generate Resource Description Framework (RDF) triples
81 by parsing syntaxes or serialise the triples into a syntax. The supported
82 parsing syntaxes are RDF/XML, N-Quads, N-Triples 1.0 and 1.1, TRiG,
83 Turtle 2008 and 2013, RDFa 1.0 and 1.1, RSS tag soup including all versions
84 of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and
85 XML. The serialising syntaxes are RDF/XML (regular, abbreviated, XMP),
86 Turtle 2013, N-Quads, N-Triples 1.1, Atom 1.0, RSS 1.0, GraphViz DOT,
87 HTML and JSON.")
88 (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
89
90 (define-public clucene
91 (package
92 (name "clucene")
93 (version "2.3.3.4")
94 (source (origin
95 (method url-fetch)
96 (uri (string-append "mirror://sourceforge/clucene/"
97 "clucene-core-unstable/2.3/clucene-core-"
98 version ".tar.gz"))
99 (sha256
100 (base32
101 "1arffdwivig88kkx685pldr784njm0249k0rb1f1plwavlrw9zfx"))
102 (patches (search-patches "clucene-pkgconfig.patch"
103 "clucene-contribs-lib.patch"))))
104 (build-system cmake-build-system)
105 (inputs
106 `(("boost" ,boost) ; could also use bundled copy
107 ("zlib" ,zlib)))
108 (arguments
109 `(#:test-target "cl_test"
110 #:configure-flags '("-DBUILD_CONTRIBS_LIB=ON")
111 #:tests? #f)) ; Tests do not compile, as TestIndexSearcher.cpp uses
112 ; undeclared usleep. After fixing this, one needs to run
113 ; "make test" in addition to "make cl_test", then
114 ; SimpleTest fails.
115 ; Notice that the library appears to be unmaintained
116 ; with no reaction to bug reports.
117 (home-page "http://clucene.sourceforge.net/")
118 (synopsis "C text indexing and searching library")
119 (description "CLucene is a high-performance, scalable, cross platform,
120 full-featured indexing and searching API. It is a port of the very popular
121 Java Lucene text search engine API to C++.")
122 (license lgpl2.1)))
123
124 (define-public lucene++
125 (package
126 (name "lucene++")
127 (version "3.0.7")
128 (source (origin
129 (method git-fetch)
130 (uri (git-reference
131 (url "https://github.com/luceneplusplus/LucenePlusPlus")
132 (commit (string-append "rel_" version))))
133 (file-name (git-file-name name version))
134 (sha256
135 (base32
136 "06b37fly6l27zc6kbm93f6khfsv61w792j8xihfagpcm9cfz2zi1"))))
137 (build-system cmake-build-system)
138 (arguments
139 `(#:configure-flags
140 ;; CXX_FLAGS suggested in a closed issue on github:
141 ;; https://github.com/luceneplusplus/LucenePlusPlus/issues/100
142 (list "-Wno-dev" "-DCMAKE_CXX_FLAGS=-DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT"
143 ;; Install in lib64 break rpath
144 "-DCMAKE_INSTALL_LIBDIR:PATH=lib")))
145 (native-inputs
146 `(("pkg-config" ,pkg-config)))
147 (inputs
148 `(("boost" ,boost)))
149 (home-page "https://github.com/luceneplusplus/LucenePlusPlus")
150 (synopsis "Text search engine")
151 (description "Lucene++ is an up to date C++ port of the popular Java
152 Lucene library, a high-performance, full-featured text search engine.")
153 (license (list asl2.0 lgpl3+)))); either asl or lgpl.
154
155 (define-public lrdf
156 (package
157 (name "lrdf")
158 (version "0.6.1")
159 (source (origin
160 (method git-fetch)
161 (uri (git-reference
162 (url "https://github.com/swh/LRDF.git")
163 (commit (string-append "v" version))))
164 (file-name (git-file-name name version))
165 (sha256
166 (base32
167 "00wzkfb8y0aqd519ypz067cq099dpc89w69zw8ln39vl6f9x2pd4"))))
168 (build-system gnu-build-system)
169 (arguments
170 '(#:phases
171 (modify-phases %standard-phases
172 (add-after 'unpack 'remove-out-of-tree-references
173 (lambda _
174 ;; remove_test depends on an out-of-tree RDF file
175 (substitute* "examples/Makefile.am"
176 (("instances_test remove_test") "instances_test")
177 (("\\$\\(TESTS\\) remove_test") "$(TESTS)"))
178 #t))
179 ;; The default bootstrap phase executes autogen.sh, which fails.
180 (replace 'bootstrap
181 (lambda _ (invoke "autoreconf" "-vif") #t)))))
182 (inputs
183 `(("raptor" ,raptor2)
184 ("cyrus-sasl" ,cyrus-sasl)
185 ("zlib" ,zlib)))
186 (native-inputs
187 `(("autoconf" ,autoconf)
188 ("automake" ,automake)
189 ("libtool" ,libtool)
190 ("pkg-config" ,pkg-config)))
191 (home-page "https://github.com/swh/LRDF")
192 (synopsis "Lightweight RDF library for accessing LADSPA plugin metadata")
193 (description
194 "LRDF is a library to make it easy to manipulate RDF files describing
195 LADSPA plugins. It can also be used for general RDF manipulation. It can
196 read RDF/XLM and N3 files and export N3 files, and it also has a light
197 taxonomic inference capability.")
198 (license gpl2)))
199
200 (define-public rasqal
201 (package
202 (name "rasqal")
203 (version "0.9.33")
204 (source (origin
205 (method url-fetch)
206 (uri (string-append "http://download.librdf.org/source/" name
207 "-" version ".tar.gz"))
208 (sha256
209 (base32
210 "0z6rrwn4jsagvarg8d5zf0j352kjgi33py39jqd29gbhcnncj939"))))
211 (build-system gnu-build-system)
212 (native-inputs
213 `(("perl" ,perl)
214 ("perl-xml-dom" ,perl-xml-dom) ; for the tests
215 ("pkg-config" ,pkg-config)))
216 (inputs
217 `(("libgcrypt" ,libgcrypt)
218 ("libxml2" ,libxml2)
219 ("mpfr" ,mpfr)
220 ("pcre" ,pcre)
221 ("util-linux" ,util-linux "lib")))
222 (propagated-inputs
223 `(("raptor2" ,raptor2))) ; stipulated by rasqal.pc
224 (arguments
225 `(#:parallel-tests? #f
226 ; test failure reported upstream, see
227 ; http://bugs.librdf.org/mantis/view.php?id=571
228 #:tests? #f))
229 (home-page "http://librdf.org/rasqal/")
230 (synopsis "RDF query library")
231 (description "Rasqal is a C library that handles Resource Description
232 Framework (RDF) query language syntaxes, query construction and execution
233 of queries returning results as bindings, boolean, RDF graphs/triples or
234 syntaxes. The supported query languages are SPARQL Query 1.0,
235 SPARQL Query 1.1, SPARQL Update 1.1 (no executing) and the Experimental
236 SPARQL extensions (LAQRS). Rasqal can write binding query results in the
237 SPARQL XML, SPARQL JSON, CSV, TSV, HTML, ASCII tables, RDF/XML and
238 Turtle/N3 and read them in SPARQL XML, RDF/XML and Turtle/N3.")
239 (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
240
241 (define-public redland
242 (package
243 (name "redland")
244 (version "1.0.17")
245 (source (origin
246 (method url-fetch)
247 (uri (string-append "http://download.librdf.org/source/" name
248 "-" version ".tar.gz"))
249 (sha256
250 (base32
251 "109n0kp39p966dpiasad2bb7q66rwbcb9avjvimw28chnpvlf66y"))))
252 (build-system gnu-build-system)
253 (native-inputs
254 `(("perl" ,perl) ; needed for installation
255 ("pkg-config" ,pkg-config)))
256 (propagated-inputs
257 `(("rasqal" ,rasqal))) ; in Requires.private field of .pc
258 (inputs
259 `(("bdb" ,bdb)))
260 (home-page "http://librdf.org/")
261 (synopsis "RDF library")
262 (description "The Redland RDF Library (librdf) provides the RDF API
263 and triple stores.")
264 (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
265
266 (define-public serd
267 (package
268 (name "serd")
269 (version "0.30.2")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "https://download.drobilla.net/serd-"
273 version ".tar.bz2"))
274 (sha256
275 (base32
276 "00kjjgs5a8r72khgpya14scvl3n58wqwl5927y14z03j25q04ccx"))))
277 (build-system waf-build-system)
278 (arguments
279 `(#:tests? #f ; no check target
280 #:phases
281 (modify-phases %standard-phases
282 (add-before
283 'configure 'set-ldflags
284 (lambda* (#:key outputs #:allow-other-keys)
285 (setenv "LDFLAGS"
286 (string-append "-Wl,-rpath="
287 (assoc-ref outputs "out") "/lib"))
288 #t)))))
289 (home-page "https://drobilla.net/software/serd/")
290 (synopsis "Library for RDF syntax supporting Turtle and NTriples")
291 (description
292 "Serd is a lightweight C library for RDF syntax which supports reading
293 and writing Turtle and NTriples. Serd is not intended to be a swiss-army
294 knife of RDF syntax, but rather is suited to resource limited or performance
295 critical applications (e.g. converting many gigabytes of NTriples to Turtle),
296 or situations where a simple reader/writer with minimal dependencies is
297 ideal (e.g. in LV2 implementations or embedded applications).")
298 (license isc)))
299
300 (define-public sord
301 (package
302 (name "sord")
303 (version "0.16.4")
304 (source (origin
305 (method url-fetch)
306 (uri (string-append "https://download.drobilla.net/sord-"
307 version ".tar.bz2"))
308 (sha256
309 (base32
310 "1mwh4qvp9q4vgrgg5bz9sgjhxscncrylf2b06h0q55ddwzs9hndi"))))
311 (build-system waf-build-system)
312 (arguments
313 `(#:tests? #f ; no check target
314 #:phases
315 (modify-phases %standard-phases
316 (add-before
317 'configure 'set-ldflags
318 (lambda* (#:key outputs #:allow-other-keys)
319 (setenv "LDFLAGS"
320 (string-append "-Wl,-rpath="
321 (assoc-ref outputs "out") "/lib"))
322 #t)))))
323 (inputs
324 `(("pcre" ,pcre)))
325 (native-inputs
326 `(("pkg-config" ,pkg-config)))
327 (propagated-inputs
328 `(("serd" ,serd))) ; required by sord-0.pc
329 (home-page "https://drobilla.net/software/sord/")
330 (synopsis "C library for storing RDF data in memory")
331 (description
332 "Sord is a lightweight C library for storing RDF data in memory.")
333 (license isc)))
334
335 (define-public python-rdflib
336 (package
337 (name "python-rdflib")
338 (version "4.2.2")
339 (source
340 (origin
341 (method url-fetch)
342 (uri (pypi-uri "rdflib" version))
343 (sha256
344 (base32
345 "0398c714znnhaa2x7v51b269hk20iz073knq2mvmqp2ma92z27fs"))))
346 (build-system python-build-system)
347 (arguments
348 '(;; FIXME: Three test failures. Should be fixed next release.
349 #:tests? #f))
350 ;; #:phases
351 ;; (modify-phases %standard-phases
352 ;; (replace 'check
353 ;; (lambda _
354 ;; ;; Run tests from the build directory so python3 only
355 ;; ;; sees the installed 2to3 version.
356 ;; (invoke "nosetests" "--where=./build/src"))))))
357 (native-inputs
358 `(("python-nose" ,python-nose)))
359 (propagated-inputs
360 `(("python-html5lib" ,python-html5lib)
361 ("python-isodate" ,python-isodate)
362 ("python-pyparsing" ,python-pyparsing)))
363 (home-page "https://github.com/RDFLib/rdflib")
364 (synopsis "Python RDF library")
365 (description
366 "RDFLib is a Python library for working with RDF, a simple yet
367 powerful language for representing information.")
368 (license (non-copyleft "file://LICENSE"
369 "See LICENSE in the distribution."))))
370
371 (define-public python2-rdflib
372 (package-with-python2 python-rdflib))