diff options
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r-- | gnu/packages/databases.scm | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index a05ba6b726..dcaba0a866 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1356,8 +1357,17 @@ trees (LSM), for sustained throughput under random insert workloads.") (("/usr/local") (assoc-ref outputs "out"))) #t))))) (home-page "https://symas.com/products/lightning-memory-mapped-database") - (synopsis "Lightning memory-mapped database library") - (description "Lightning memory-mapped database library.") + (synopsis "Lightning Memory-Mapped Database library") + (description + "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance +transactional database. Unlike more complex relational databases, LMDB handles +only key-value pairs (stored as arbitrary byte arrays) and relies on the +underlying operating system for caching and locking, keeping the code small and +simple. +The use of ‘zero-copy’ memory-mapped files combines the persistence of classic +disk-based databases with high read performance that scales linearly over +multiple cores. The size of each database is limited only by the size of the +virtual address space — not physical RAM.") (license license:openldap2.8))) (define-public libpqxx @@ -1539,3 +1549,49 @@ file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL, etc., and an SQL engine for performing simple SQL queries.") (license (list license:lgpl2.0 license:gpl2+)))) + +(define-public python-lmdb + (package + (name "python-lmdb") + (version "0.92") + (source (origin + (method url-fetch) + (uri (pypi-uri "lmdb" version)) + (sha256 + (base32 + "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx")) + (modules '((guix build utils))) + (snippet + ;; Delete bundled lmdb source files. + '(for-each delete-file (list "lib/lmdb.h" + "lib/mdb.c" + "lib/midl.c" + "lib/midl.h"))))) + (build-system python-build-system) + (inputs + `(("lmdb" ,lmdb))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'use-system-lmdb + (lambda* (#:key inputs #:allow-other-keys) + (let ((lmdb (assoc-ref inputs "lmdb"))) + (setenv "LMDB_FORCE_SYSTEM" "set") + (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include")) + (setenv "LMDB_LIBDIR" (string-append lmdb "/lib")) + #t)))) + ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’. + #:tests? #f)) + (home-page "https://github.com/dw/py-lmdb") + (synopsis "Python binding for the ‘Lightning’ database (LMDB)") + (description + "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning +Memory-Mapped Database} (LMDB), a high-performance key-value store.") + (license + (list license:openldap2.8 + ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3, + ;; but not actually needed on platforms currently supported by Guix. + license:bsd-3)))) + +(define-public python2-lmdb + (package-with-python2 python-lmdb)) |