X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/2f837cf7fe100b0584fb02cf8f19d4cfb4e14d88..57af0d13b2ff44dd152febfe8b96cd7c859b2844:/gnu/packages/databases.scm diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 648ba81aaf..991bb3d692 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -5,11 +5,11 @@ ;;; Copyright © 2014, 2016 David Thompson ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Eric Bavier -;;; Copyright © 2015 Sou Bunnbu +;;; Copyright © 2015, 2016 Sou Bunnbu ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2016, 2017 ng0 -;;; Copyright © 2016 Roel Janssen +;;; Copyright © 2016, 2017 Roel Janssen ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Andy Patterson @@ -18,6 +18,8 @@ ;;; Copyright © 2017 Arun Isaac ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017 Alex Vong +;;; Copyright © 2017 Ben Woodcroft +;;; Copyright © 2017 Rutger Helling ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,6 +54,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) + #:use-module (gnu packages time) #:use-module (gnu packages jemalloc) #:use-module (gnu packages language) #:use-module (gnu packages libevent) @@ -66,8 +69,11 @@ #:use-module (gnu packages python) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) + #:use-module (gnu packages ruby) + #:use-module (gnu packages serialization) #:use-module (gnu packages tcl) #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -75,6 +81,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (guix build-system ruby) #:use-module (guix build-system cmake) #:use-module (guix utils) #:use-module (srfi srfi-26) @@ -115,9 +122,9 @@ (arguments `(#:phases (modify-phases %standard-phases - (add-before 'configure 'generate-configure + (add-after 'unpack 'generate-configure (lambda _ - (zero? (system* "./autogen.sh"))))))) + (zero? (system* "sh" "autogen.sh"))))))) ;; http://www.4store.org has been down for a while now. (home-page "https://github.com/garlik/4store") (synopsis "Clustered RDF storage and query engine") @@ -150,14 +157,14 @@ and provides interfaces to the traditional file format.") (define-public bdb (package (name "bdb") - (version "6.2.23") + (version "6.2.32") (source (origin (method url-fetch) (uri (string-append "http://download.oracle.com/berkeley-db/db-" version ".tar.gz")) (sha256 (base32 - "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7")))) + "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9")))) (build-system gnu-build-system) (outputs '("out" ; programs, libraries, headers "doc")) ; 94 MiB of HTML docs @@ -165,34 +172,33 @@ and provides interfaces to the traditional file format.") '(#:tests? #f ; no check target available #:disallowed-references ("doc") #:phases - (alist-replace - 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (doc (assoc-ref outputs "doc"))) - ;; '--docdir' is not honored, so we need to patch. - (substitute* "dist/Makefile.in" - (("docdir[[:blank:]]*=.*") - (string-append "docdir = " doc "/share/doc/bdb"))) - - (zero? - (system* "./dist/configure" - (string-append "--prefix=" out) - (string-append "CONFIG_SHELL=" (which "bash")) - (string-append "SHELL=" (which "bash")) - - ;; Remove 7 MiB of .a files. - "--disable-static" - - ;; The compatibility mode is needed by some packages, - ;; notably iproute2. - "--enable-compat185" - - ;; The following flag is needed so that the inclusion - ;; of db_cxx.h into C++ files works; it leads to - ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. - "--enable-cxx")))) - %standard-phases))) + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + ;; '--docdir' is not honored, so we need to patch. + (substitute* "dist/Makefile.in" + (("docdir[[:blank:]]*=.*") + (string-append "docdir = " doc "/share/doc/bdb"))) + + (zero? + (system* "./dist/configure" + (string-append "--prefix=" out) + (string-append "CONFIG_SHELL=" (which "bash")) + (string-append "SHELL=" (which "bash")) + + ;; Remove 7 MiB of .a files. + "--disable-static" + + ;; The compatibility mode is needed by some packages, + ;; notably iproute2. + "--enable-compat185" + + ;; The following flag is needed so that the inclusion + ;; of db_cxx.h into C++ files works; it leads to + ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. + "--enable-cxx")))))))) (synopsis "Berkeley database") (description "Berkeley DB is an embeddable database allowing developers the choice of @@ -220,39 +226,77 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") `(#:tests? #f ; no check target available #:disallowed-references ("doc") #:phases - (alist-replace - 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (doc (assoc-ref outputs "doc"))) - ;; '--docdir' is not honored, so we need to patch. - (substitute* "dist/Makefile.in" - (("docdir[[:blank:]]*=.*") - (string-append "docdir = " doc "/share/doc/bdb"))) - - (zero? - (system* "./dist/configure" - (string-append "--prefix=" out) - (string-append "CONFIG_SHELL=" (which "bash")) - (string-append "SHELL=" (which "bash")) - - ;; Bdb doesn't recognize aarch64 as an architecture. - ,@(if (string=? "aarch64-linux" (%current-system)) - '("--build=aarch64-unknown-linux-gnu") - '()) - - ;; Remove 7 MiB of .a files. - "--disable-static" - - ;; The compatibility mode is needed by some packages, - ;; notably iproute2. - "--enable-compat185" - - ;; The following flag is needed so that the inclusion - ;; of db_cxx.h into C++ files works; it leads to - ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. - "--enable-cxx")))) - %standard-phases))))) + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + ;; '--docdir' is not honored, so we need to patch. + (substitute* "dist/Makefile.in" + (("docdir[[:blank:]]*=.*") + (string-append "docdir = " doc "/share/doc/bdb"))) + + (zero? + (system* "./dist/configure" + (string-append "--prefix=" out) + (string-append "CONFIG_SHELL=" (which "bash")) + (string-append "SHELL=" (which "bash")) + + ;; Bdb doesn't recognize aarch64 as an architecture. + ,@(if (string=? "aarch64-linux" (%current-system)) + '("--build=aarch64-unknown-linux-gnu") + '()) + + ;; Remove 7 MiB of .a files. + "--disable-static" + + ;; The compatibility mode is needed by some packages, + ;; notably iproute2. + "--enable-compat185" + + ;; The following flag is needed so that the inclusion + ;; of db_cxx.h into C++ files works; it leads to + ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. + "--enable-cxx")))))))))) + +(define-public es-dump-restore + (package + (name "es-dump-restore") + (version "2.1.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "es_dump_restore" version)) + (sha256 + (base32 + "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim")))) + (build-system ruby-build-system) + (arguments + '(#:tests? #f ;; No testsuite. + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-bin-es_dump_restore + (lambda* (#:key outputs #:allow-other-keys) + (wrap-program (string-append (assoc-ref outputs "out") + "/bin/es_dump_restore") + `("GEM_PATH" ":" prefix (,(string-append + (getenv "GEM_PATH") + ":" + (getenv "GEM_HOME"))))) + #t))))) + (propagated-inputs + `(("ruby-httpclient" ,ruby-httpclient) + ("ruby-multi-json" ,ruby-multi-json) + ("ruby-progress_bar" ,ruby-progress_bar) + ("ruby-rubyzip" ,ruby-rubyzip) + ("ruby-thor" ,ruby-thor))) + (synopsis "Utility for dumping and restoring ElasticSearch indexes") + (description + "This package provides a utility for dumping the contents of an +ElasticSearch index to a compressed file and restoring the dumpfile back to an +ElasticSearch server") + (home-page "https://github.com/patientslikeme/es_dump_restore") + (license license:expat))) (define-public leveldb (package @@ -314,10 +358,102 @@ and generic API, and was originally intended for use with dynamic web applications.") (license license:bsd-3))) +(define-public mongodb + (package + (name "mongodb") + (version "3.4.9") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/mongodb/mongo/archive/r" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0gidwyvh3bdwmk2pccgkqkaln4ysgn8iwa7ihjzllsq0rdg95045")) + (patches + (list + (search-patch "mongodb-support-unknown-linux-distributions.patch"))))) + (build-system gnu-build-system) + (inputs + `(("openssl" ,openssl) + ("pcre" ,pcre) + ("yaml-cpp" ,yaml-cpp) + ("zlib" ,zlib) + ("snappy" ,snappy) + ("boost" ,boost))) + (native-inputs + `(("scons" ,scons) + ("python" ,python-2) + ("valgrind" ,valgrind) + ("perl" ,perl))) + (arguments + `(#:phases + (let ((common-options + `(;; "--use-system-tcmalloc" TODO: Missing gperftools + "--use-system-pcre" + ;; TODO + ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1 + ;; --use-system-boost + "--use-system-snappy" + "--use-system-zlib" + "--use-system-valgrind" + ;; "--use-system-stemmer" TODO: Missing relevant package + "--use-system-yaml" + "--disable-warnings-as-errors" + ,(format #f "--jobs=~a" (parallel-job-count)) + "--ssl"))) + (modify-phases %standard-phases + (delete 'configure) ; There is no configure phase + (add-after 'unpack 'scons-propagate-environment + (lambda _ + ;; Modify the SConstruct file to arrange for + ;; environment variables to be propagated. + (substitute* "SConstruct" + (("^env = Environment\\(") + "env = Environment(ENV=os.environ, ")) + #t)) + (add-after 'unpack 'create-version-file + (lambda _ + (call-with-output-file "version.json" + (lambda (port) + (display ,(simple-format #f "{ + \"version\": \"~A\" +}" version) port))) + #t)) + (replace 'build + (lambda _ + (zero? (apply system* + `("scons" + ,@common-options + "mongod" "mongo" "mongos"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (or (not tests?) + (zero? (apply system* + `("scons" + ,@common-options + "dbtest" "unittests")))))) + (replace 'install + (lambda _ + (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))) + (install-file "mongod" bin) + (install-file "mongos" bin) + (install-file "mongo" bin)) + #t)))))) + (home-page "https://www.mongodb.org/") + (synopsis "High performance and high availability document database") + (description + "Mongo is a high-performance, high availability, schema-free +document-oriented database. A key goal of MongoDB is to bridge the gap +between key/value stores (which are fast and highly scalable) and traditional +RDBMS systems (which are deep in functionality).") + (license (list license:agpl3 + ;; Some parts are licensed under the Apache License + license:asl2.0)))) + (define-public mysql (package (name "mysql") - (version "5.7.19") + (version "5.7.20") (source (origin (method url-fetch) (uri (list (string-append @@ -329,7 +465,7 @@ applications.") name "-" version ".tar.gz"))) (sha256 (base32 - "1c8y54yk756179nx4dgg79dijmjdq5n8l057cnqsg70pjdpyfl9y")))) + "11v4g3igigv3zvknv67qml8in6fjrbs2vnr3q6bg6f62nydm95sk")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -371,12 +507,7 @@ applications.") (for-each delete-file (find-files (string-append out "/bin") "_embedded$")) - #t)))) - ;; On aarch64 the test suite runs out of memory and fails. - ,@(if (string-prefix? "aarch64-linux" - (or (%current-target-system) (%current-system))) - '(#:tests? #f) - '()))) + #t)))))) (native-inputs `(("bison" ,bison) ("perl" ,perl))) @@ -474,14 +605,14 @@ as a drop-in replacement of MySQL.") (define-public postgresql (package (name "postgresql") - (version "9.6.4") + (version "10.0") (source (origin (method url-fetch) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "04yffrrmn85k25n3nq389aa9c1j8mkimrf889kayl772h9nv2fib")))) + "1lbzwpmdxmk5bh0ix0rn72qbd52dq5cb55nzajscb0bvwa95abvi")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-uuid=e2fs") @@ -515,6 +646,19 @@ TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video.") (license (license:x11-style "file://COPYRIGHT")))) +(define-public postgresql-9.6 + (package + (inherit postgresql) + (name "postgresql") + (version "9.6.5") + (source (origin + (method url-fetch) + (uri (string-append "https://ftp.postgresql.org/pub/source/v" + version "/postgresql-" version ".tar.bz2")) + (sha256 + (base32 + "0k3ls2x182jz6djjiqj9kycddabdl2gk1y1ajq1vipnxwfki5nh6")))))) + (define-public qdbm (package (name "qdbm") @@ -793,14 +937,14 @@ is in the public domain.") (define-public tdb (package (name "tdb") - (version "1.3.14") + (version "1.3.15") (source (origin (method url-fetch) (uri (string-append "https://www.samba.org/ftp/tdb/tdb-" version ".tar.gz")) (sha256 (base32 - "1sfbia8xyaywgx9zy7x618vrvyx9gc3cgqf763shsii9javlnz9s")))) + "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl")))) (build-system gnu-build-system) (arguments '(#:phases @@ -1438,14 +1582,14 @@ on another machine, accessed via TCP/IP.") (define-public python-peewee (package (name "python-peewee") - (version "2.8.3") + (version "2.10.2") (source (origin (method url-fetch) (uri (pypi-uri "peewee" version)) (sha256 (base32 - "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd")))) + "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; Fails to import test data @@ -1568,7 +1712,7 @@ for ODBC.") (arguments `(#:phases (modify-phases %standard-phases - (add-before 'configure 'autoreconf + (add-after 'unpack 'autoreconf (lambda _ (zero? (system* "autoreconf" "-vfi"))))))) (home-page "http://mdbtools.sourceforge.net/") @@ -1584,13 +1728,13 @@ etc., and an SQL engine for performing simple SQL queries.") (define-public python-lmdb (package (name "python-lmdb") - (version "0.92") + (version "0.93") (source (origin (method url-fetch) (uri (pypi-uri "lmdb" version)) (sha256 (base32 - "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx")) + "0xdpb298fyl68acadbwv5801wcwfpnhc7sm4bnrq1x4bd5dhhsql")) (modules '((guix build utils))) (snippet ;; Delete bundled lmdb source files. @@ -1626,3 +1770,83 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.") (define-public python2-lmdb (package-with-python2 python-lmdb)) + +(define-public python-orator + (package + (name "python-orator") + (version "0.9.7") + (source (origin + (method url-fetch) + (uri (pypi-uri "orator" version)) + (sha256 + (base32 + "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'loosen-dependencies + ;; Tests are not actually run since they are not included with the + ;; distributed package, but dependencies are checked. + (lambda _ + (substitute* "setup.py" + ((",<.*'") "'") + (("flexmock==0.9.7") "flexmock") + ;; The pytest-mock package is out of date, so we remove minimum + ;; version requirement. + (("pytest-mock.*'") "pytest-mock'")) + #t))))) + (native-inputs + `(("python-pytest-mock" ,python-pytest-mock) + ("python-pytest" ,python-pytest-3.0) + ("python-flexmock" ,python-flexmock))) + (propagated-inputs + `(("python-backpack" ,python-backpack) + ("python-blinker" ,python-blinker) + ("python-cleo" ,python-cleo) + ("python-faker" ,python-faker) + ("python-inflection" ,python-inflection) + ("python-lazy-object-proxy" ,python-lazy-object-proxy) + ("python-pendulum" ,python-pendulum) + ("python-pyaml" ,python-pyaml) + ("python-pygments" ,python-pygments) + ("python-simplejson" ,python-simplejson) + ("python-six" ,python-six) + ("python-wrapt" ,python-wrapt))) + (home-page "https://orator-orm.com/") + (synopsis "ActiveRecord ORM for Python") + (description + "Orator provides a simple ActiveRecord-like Object Relational Mapping +implementation for Python.") + (license license:expat) + (properties `((python2-variant . ,(delay python2-orator)))))) + +(define-public python2-orator + (package-with-python2 (strip-python2-variant python-orator))) + +(define-public virtuoso-ose + (package + (name "virtuoso-ose") + (version "7.2.4.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/openlink/virtuoso-opensource/releases/" + "download/v" version "/virtuoso-opensource-" version ".tar.gz")) + (sha256 + (base32 "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f)) ; Tests require a network connection. + (inputs + `(("openssl" ,openssl) + ("net-tools" ,net-tools))) + (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/") + (synopsis "Multi-model database system") + (description "Virtuoso is a scalable cross-platform server that combines +relational, graph, and document data management with web application server +and web services platform functionality.") + ;; configure: error: ... can only be build on 64bit platforms + (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux")) + (license license:gpl2)))