From: Marius Bakke <mbakke@fastmail.com>
To: guix-devel@gnu.org
Cc: Marius Bakke <mbakke@fastmail.com>
Subject: [PATCH 4/6] gnu: Add rocksdb.
Date: Sun, 15 Jan 2017 21:33:36 +0100 [thread overview]
Message-ID: <20170115203338.19769-5-mbakke@fastmail.com> (raw)
In-Reply-To: <20170115203338.19769-1-mbakke@fastmail.com>
* gnu/packages/databases.scm (rocksdb): New variable.
---
gnu/packages/databases.scm | 86 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 4bbe55bab..610749d98 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -54,8 +54,10 @@
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages python)
+ #:use-module (gnu packages parallel)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages popt)
#:use-module (gnu packages rdf)
#:use-module (gnu packages xml)
#:use-module (gnu packages bison)
@@ -480,6 +482,90 @@ types are supported, as is encryption.")
(license gpl3+)
(home-page "http://www.gnu.org/software/recutils/")))
+(define-public rocksdb
+ (package
+ (name "rocksdb")
+ (version "5.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/facebook/rocksdb"
+ "/archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0kija4q6nbkjaj1x94q6qb73abgc5i49rakppxj3a368pg9nwz54"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; TODO: unbundle gtest.
+ (delete-file "build_tools/gnu_parallel")
+ #t))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags (list "CC=gcc"
+ ;; Make the resulting library position-independent so the
+ ;; static version can be included in shared objects.
+ "EXTRA_CXXFLAGS=-fPIC"
+ (string-append "INSTALL_PATH="
+ (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ (substitute* "Makefile"
+ (("build_tools/gnu_parallel") "parallel")
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))
+ #t))
+ (delete 'configure)
+ (add-before 'check 'disable-failing-tests
+ (lambda _
+ (substitute* "Makefile"
+ ;; These tests reliably fail due to "Too many open files".
+ (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
+ (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
+ #t))
+ (add-after 'check 'build-release-libraries
+ ;; The 'check' target depends on the default target which
+ ;; is compiled with debug symbols. The 'install' target depends
+ ;; on custom release targets so we build them here for clarity.
+ ;; TODO: Add debug output.
+ (lambda* (#:key (make-flags '()) #:allow-other-keys)
+ ;; Prevent the build from adding machine-specific optimizations.
+ ;; This does not work if passed as a make flag...
+ (setenv "PORTABLE" "1")
+ (and (zero? (apply system* "make" "static_lib" make-flags))
+ (zero? (apply system* "make" "shared_lib" make-flags)))))
+ (add-after 'install 'move-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (static (assoc-ref outputs "static"))
+ (slib (string-append static "/lib")))
+ (mkdir-p slib)
+ (for-each (lambda (file)
+ (install-file file slib)
+ (delete-file file))
+ (find-files lib "\\.l?a$"))
+ #t))))))
+ (outputs
+ '("out" "static"))
+ (native-inputs
+ `(("parallel" ,parallel)
+ ("perl" ,perl)
+ ("procps" ,procps)
+ ("python" ,python-2)))
+ (inputs
+ `(("bzip2" ,bzip2)
+ ("gflags" ,gflags)
+ ("snappy" ,snappy)
+ ("zlib" ,zlib)))
+ (home-page "http://rocksdb.org/")
+ (synopsis "Persistent key-value store for fast storage")
+ (description
+ "RocksDB is an embeddable, persistent key-value storage library that is
+designed for flash and RAM storage.")
+ (license bsd-3)))
+
(define-public sparql-query
(package
(name "sparql-query")
--
2.11.0
next prev parent reply other threads:[~2017-01-15 20:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-15 20:33 [PATCH 0/6] gnu: Add ceph Marius Bakke
2017-01-15 20:33 ` [PATCH 1/6] gnu: Add leveldb Marius Bakke
2017-01-17 22:34 ` Ludovic Courtès
2017-01-15 20:33 ` [PATCH 2/6] gnu: Add crypto++ Marius Bakke
2017-01-17 22:38 ` Ludovic Courtès
2017-01-17 22:46 ` Leo Famulari
2017-01-17 22:57 ` Marius Bakke
2017-01-15 20:33 ` [PATCH 3/6] gnu: Add python-cram Marius Bakke
2017-01-17 22:36 ` Ludovic Courtès
2017-01-15 20:33 ` Marius Bakke [this message]
2017-01-17 22:42 ` [PATCH 4/6] gnu: Add rocksdb Ludovic Courtès
2017-01-18 0:10 ` Marius Bakke
2017-01-18 21:29 ` Ludovic Courtès
2017-01-15 20:33 ` [PATCH 5/6] gnu: Add ceph Marius Bakke
2017-01-17 22:47 ` Ludovic Courtès
2017-01-17 23:11 ` Marius Bakke
2017-01-18 21:27 ` Ludovic Courtès
2017-01-15 20:33 ` [PATCH 6/6] gnu: fio: Enable rbd support Marius Bakke
2017-01-17 22:48 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170115203338.19769-5-mbakke@fastmail.com \
--to=mbakke@fastmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.