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