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