diff options
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r-- | gnu/packages/databases.scm | 260 |
1 files changed, 221 insertions, 39 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 91cf4f7174..bfa78556bc 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -87,13 +87,16 @@ #:use-module (gnu packages guile) #:use-module (gnu packages time) #:use-module (gnu packages golang) + #:use-module (gnu packages icu4c) #:use-module (gnu packages jemalloc) #:use-module (gnu packages language) + #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages logging) #:use-module (gnu packages man) #:use-module (gnu packages maths) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages parallel) @@ -234,7 +237,7 @@ standard Go idioms.") (define-public ephemeralpg (package (name "ephemeralpg") - (version "3.0") + (version "3.1") (source (origin (method url-fetch) @@ -242,10 +245,10 @@ standard Go idioms.") "https://eradman.com/ephemeralpg/code/ephemeralpg-" version ".tar.gz")) (sha256 - (base32 "1j0g7g114ma7y7sadbng5p1ss1zsm9zpicm77qspym6565733vvh")))) + (base32 "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6")))) (build-system gnu-build-system) (arguments - '(#:make-flags (list "CC=gcc" + `(#:make-flags (list (string-append "CC=" ,(cc-for-target)) (string-append "PREFIX=" %output)) #:phases (modify-phases %standard-phases @@ -308,6 +311,183 @@ ElasticSearch server") (home-page "https://github.com/patientslikeme/es_dump_restore") (license license:expat))) +(define-public firebird + (package + (name "firebird") + (version "3.0.7") + (source + (let ((revision "33374-0")) + (origin + (method url-fetch) + (uri (string-append "https://github.com/FirebirdSQL/" + "firebird/releases/download/R" + (string-replace-substring version "." "_") "/" + "Firebird-" version "." revision ".tar.bz2")) + (sha256 + (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c")) + (modules '((guix build utils))) + (snippet + `(begin + (for-each + delete-file-recursively + (list "extern/btyacc/test" ; TODO: package and remove entirely + "extern/editline" + "extern/icu" + "extern/libtommath" + "extern/zlib" + "src/include/firebird/impl/boost" + + ;; Missing licence. + "builds/install/arch-specific/solaris" + "extern/SfIO" + "src/msgs/templates.sql" + + ;; Generated files missing sources. + "doc/Firebird-3-QuickStart.pdf" + (string-append "doc/Firebird-" ,version + "-ReleaseNotes.pdf") + "doc/README.SecureRemotePassword.html")) + #t))))) + (build-system gnu-build-system) + (outputs (list "debug" "out")) + (arguments + `(#:configure-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "--with-fbsbin=" out "/sbin") + (string-append "--with-fbdoc=" out "/share/doc/" + ,name "-" ,version) + (string-append "--with-fbconf=" out "/lib/firebird") + (string-append "--with-fbintl=" out "/lib/firebird/intl") + (string-append "--with-fbmisc=" out "/lib/firebird/misc") + (string-append "--with-fbmsg=" out "/lib/firebird") + (string-append "--with-fbplugins=" out "/lib/firebird/plugins") + (string-append "--with-fbudf=" out "/lib/firebird/UDF") + "--with-fbglock=/run/firebird" + "--with-fblog=/var/log/firebird" + "--with-fbhelp=/var/lib/firebird/system" + "--with-fbsecure-db=/var/lib/firebird/secure" + "--without-fbsample" + "--without-fbsample-db" + "--with-system-editline")) + #:make-flags + (list (string-append "CC=" ,(cc-for-target)) + ;; The plugins/ can't find libfbclient otherwise. + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) + #:tests? #f ; no test suite + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-system-boost + (lambda _ + (substitute* "src/include/firebird/Message.h" + (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"") + "<boost/preprocessor/seq/for_each_i.hpp>") + (("FB_BOOST_") "BOOST_")) + #t)) + (add-after 'unpack 'patch-installation + (lambda _ + (substitute* + "builds/install/arch-specific/linux/makeInstallImage.sh.in" + (("/bin/sh") (which "bash")) + ;; Remove shell script helpers from $PATH. + (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":") + ;; Put files where Guix users expect them. + (("(License\\.txt.*)@FB_CONFDIR" match) + (string-append match "@FB_DOCDIR@")) + (("@FB_CONFDIR@(.*License\\.txt.*)" match) + (string-append "@FB_DOCDIR@" match)) + (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail) + (string-append head "@FB_DOCDIR@" tail "\n"))) + (substitute* + (list "builds/install/posix-common/changeServerMode.sh.in" + "builds/install/posix-common/install.sh.in") + ;; Skip phases that (could) cause problems in Guix. + (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser") + ":") + ;; Skip phases that are merely pointless on Guix. + (("buildUninstallFile|installInitdScript|startFirebird") ":") + ;; Omit randomly generated password with bonus timestamp. + (("setDBAPassword") ":")) + + ;; These promote proprietary workflows not relevant on Guix. + (for-each delete-file-recursively + (find-files "doc" "README\\.(build\\.msvc|NT|Win)")) + #t)) + (add-after 'configure 'delete-init-scripts + (lambda _ + (delete-file-recursively "gen/install/misc") + #t)) + (add-before 'build 'set-build-environment-variables + (lambda _ + ;; ‘isql’ needs to run & find libfbclient.so during the build. + ;; This doubles as a rudimentary test in lieu of a test suite. + (setenv "LD_LIBRARY_PATH" + (string-append (assoc-ref %build-inputs "icu4c") "/lib")) + #t)) + (add-before 'install 'keep-embedded-debug-symbols + (lambda _ + ;; Let the gnu-build-system separate & deal with them later. + ;; XXX Upstream would use ‘--strip-unneeded’, shaving a whole + ;; megabyte off Guix's 7.7M libEngine12.so, for example. + (substitute* "gen/Makefile.install" + (("readelf") "false")) + #t)) + (add-after 'install 'prune-undesirable-files + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion out + ;; Remove example binaries. + (for-each delete-file-recursively + (find-files "." "example")) + ;; Delete (now-)empty directories. + (for-each rmdir + (list "include/firebird/impl" + "lib/firebird/plugins/udr")) + #t))))))) + (inputs + `(("boost" ,boost) + ("editline" ,editline) + ("icu4c" ,icu4c-67) + ("libtommath" ,libtommath) + ("ncurses" ,ncurses) + ("zlib" ,zlib))) + (home-page "https://www.firebirdsql.org") + (synopsis "Relational database with many ANSI SQL standard features") + (description + "Firebird is an SQL @acronym{RDBMS, relational database management system} +with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}) including +@acronym{UDFs, user-defined functions} and PSQL stored procedures, cursors, and +triggers. Transactions provide full ACID-compliant referential integrity. + +The database requires very little manual maintenance once set up, making it +ideal for small business or embedded use. + +When installed as a traditional local or remote (network) database server, +Firebird can grow to terabyte scale with proper tuning---although PostgreSQL +may be a better choice for such very large environments. + +Firebird can also be embedded into stand-alone applications that don't want or +need a full client & server. Used in this manner, it offers richer SQL support +than SQLite as well as the option to seamlessly migrate to a client/server +database later.") + (properties + `((lint-hidden-cve . ("CVE-2017-6369")))) + (license + ;; See doc/license/README.license.usage.txt for rationale & details. + (list license:bsd-3 ; src/common/sha2/ + license:bsd-4 ; src/common/enc.cpp + license:gpl2+ ; builds/posix/make.defaults + (license:non-copyleft "file:///builds/install/misc/IPLicense.txt" + "InterBase Public License v1.0") + (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt" + "Initial Developer's Public License v1.0") + license:lgpl2.1 ; exception for OSI-compatible licences + license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp + license:public-domain)))) ; including files without explicit licence + (define-public leveldb (package (name "leveldb") @@ -956,16 +1136,16 @@ as a drop-in replacement of MySQL.") (define-public mariadb-connector-c (package (name "mariadb-connector-c") - (version "3.1.10") - (source (origin - (method url-fetch) - (uri (string-append - "https://downloads.mariadb.org/f/connector-c-" - version "/mariadb-connector-c-" - version "-src.tar.gz")) - (sha256 - (base32 - "13v5z4w1cl890lnr2fbwbziw638lqw2aga45vdq1z0cyrc9mcgmg")))) + (version "3.1.11") + (source + (origin + (method url-fetch) + (uri (string-append + "https://downloads.mariadb.org/f/connector-c-" version + "/mariadb-connector-c-" version "-src.tar.gz" + "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve")) + (sha256 + (base32 "03svzahdf7czjlm695c11r4bfd04qdqgx8r1vkpr1zlkjhwnqvry")))) (inputs `(("openssl" ,openssl))) (build-system cmake-build-system) @@ -1024,6 +1204,8 @@ TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video.") (license (license:x11-style "file://COPYRIGHT")))) +(define-public postgresql-10 postgresql) + (define-public postgresql-11 (package (inherit postgresql) @@ -1126,12 +1308,12 @@ organized in a hash table or B+ tree.") (native-inputs `(("bc" ,bc) ("bash:include" ,bash "include") ("check" ,check-0.14) - ("libuuid" ,util-linux) ("pkg-config" ,pkg-config))) ;; TODO: Add more optional inputs. (inputs `(("curl" ,curl) - ("libgcrypt" ,libgcrypt))) + ("libgcrypt" ,libgcrypt) + ("libuuid" ,util-linux "lib"))) (synopsis "Manipulate plain text files as databases") (description "GNU Recutils is a set of tools and libraries for creating and @@ -1188,6 +1370,7 @@ including field and record folding."))) `(#:make-flags (list "CC=gcc" "V=1" ;; Ceph requires that RTTI is enabled. "USE_RTTI=1" + "date=1970-01-01" ; build reproducibly (string-append "INSTALL_PATH=" (assoc-ref %outputs "out")) @@ -2137,7 +2320,7 @@ database.") (define-public lmdb (package (name "lmdb") - (version "0.9.26") + (version "0.9.27") (source (origin (method git-fetch) @@ -2146,7 +2329,7 @@ database.") (commit (string-append "LMDB_" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0323xwb2rqyrr9vr6gbxc2kl89drhqw0ifmyh9pg9qgqmymyhxdx")))) + (base32 "09xqqm8yjsf1gv4gd4llal48sms76hfhxadx6rik1j2g5v3d3f1k")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -2238,17 +2421,18 @@ on another machine, accessed via TCP/IP.") (define-public python-peewee (package (name "python-peewee") - (version "3.9.6") - (source - (origin - (method url-fetch) - (uri (pypi-uri "peewee" version)) - (sha256 - (base32 - "1j4sh946k0736m7pd54z0y6i2hjhgg3kdllx1pwq8xkzzcgrx1xw")))) + (version "3.14.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "peewee" version)) + (sha256 + (base32 "1yl49gxrg0c2x3n3r60z3lixw9am8b61s0477l9vjabhhx1yziar")))) (build-system python-build-system) (arguments - `(#:tests? #f)) ; Fails to import test data + `(#:tests? #f)) ; fails to import test data + (inputs + `(("sqlite" ,sqlite))) (native-inputs `(("python-cython" ,python-cython))) (home-page "https://github.com/coleifer/peewee/") @@ -3273,7 +3457,7 @@ transforms idiomatic python function calls to well-formed SQL queries.") (define-public python-pypika (package (name "python-pypika") - (version "0.37.2") + (version "0.44.0") (source (origin (method git-fetch) (uri (git-reference @@ -3282,7 +3466,7 @@ transforms idiomatic python function calls to well-formed SQL queries.") (file-name (git-file-name name version)) (sha256 (base32 - "089z1c778q1fwhzsc88ws8j5gm2hgxknibabn4wpax8rz2bfs3ck")))) + "0mpddrw9z1pzcc40j3pzhd583hlgjx96aa8ak6m9zzhpm4bv3ard")))) (build-system python-build-system) (native-inputs `(("python-parameterized" ,python-parameterized))) @@ -3687,7 +3871,7 @@ The drivers officially supported by @code{libdbi} are: (define-public soci (package (name "soci") - (version "4.0.0") + (version "4.0.1") (source (origin (method git-fetch) (uri (git-reference @@ -3696,23 +3880,21 @@ The drivers officially supported by @code{libdbi} are: (file-name (git-file-name name version)) (sha256 (base32 - "06faswdxd2frqr9xnx6bxc7zwarlzsbdi3bqpz7kwdxsjvq41rnb")))) + "14x2gjblkgpflv75wl144cyjp1sis5rbxnr9r2gj3yw16v2av0bp")))) (build-system cmake-build-system) (inputs - `(("postgresql" ,postgresql) + `(("firebird" ,firebird) + ("postgresql" ,postgresql) ("sqlite" ,sqlite) ("odbc" ,unixodbc) ("boost" ,boost) ("mariadb:dev" ,mariadb "dev"))) (arguments - `(#:tests? #f ; Tests may require running database management systems. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-lib-path - (lambda _ - (substitute* "CMakeLists.txt" - (("set\\(SOCI_LIBDIR \"lib64\"\\)") "")) - #t))))) + `(#:configure-flags + ;; C++11 (-DSOCI_CXX11) is OFF by default. hyperledger-iroha needs it. + (list "-DCMAKE_CXX_STANDARD=17" + "-DSOCI_LIBDIR=lib") + #:tests? #f)) ; may require running database management systems (synopsis "C++ Database Access Library") (description "SOCI is an abstraction layer for several database backends, including |