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