2019-07-17 14:04:31 +01:00
|
|
|
{ stdenv, fetchFromGitHub, lib, bzip2, cmake, lz4, snappy, zlib, zstd, enableLite ? false }:
|
2015-04-21 19:01:44 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-29 07:18:02 +01:00
|
|
|
pname = "rocksdb";
|
2019-11-03 06:32:00 +00:00
|
|
|
version = "6.4.6";
|
2018-03-11 15:41:57 +00:00
|
|
|
|
2015-04-21 19:01:44 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
2019-04-29 07:18:02 +01:00
|
|
|
repo = pname;
|
2015-11-06 02:20:18 +00:00
|
|
|
rev = "v${version}";
|
2019-11-03 06:32:00 +00:00
|
|
|
sha256 = "0s0n4p1b4jzmslz9d2xd4ajra0m6l9x26mjwlbgw0klxjggmy8qn";
|
2015-04-21 19:01:44 +01:00
|
|
|
};
|
2018-04-04 02:23:24 +01:00
|
|
|
|
2019-04-29 07:18:02 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2019-07-17 14:04:31 +01:00
|
|
|
buildInputs = [ bzip2 lz4 snappy zlib zstd ];
|
2019-04-29 07:18:02 +01:00
|
|
|
|
2019-08-07 08:30:35 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt --replace "find_package(zlib " "find_package(ZLIB "
|
|
|
|
'';
|
2019-04-29 07:18:02 +01:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPORTABLE=1"
|
|
|
|
"-DWITH_JEMALLOC=0"
|
|
|
|
"-DWITH_JNI=0"
|
|
|
|
"-DWITH_TESTS=0"
|
|
|
|
"-DWITH_TOOLS=0"
|
|
|
|
"-DWITH_BZ2=1"
|
|
|
|
"-DWITH_LZ4=1"
|
|
|
|
"-DWITH_SNAPPY=1"
|
|
|
|
"-DWITH_ZLIB=1"
|
|
|
|
"-DWITH_ZSTD=1"
|
2019-07-17 14:04:31 +01:00
|
|
|
"-DWITH_GFLAGS=0"
|
2019-11-09 22:32:56 +00:00
|
|
|
"-DUSE_RTTI=1"
|
2019-04-29 07:18:02 +01:00
|
|
|
(lib.optional
|
|
|
|
(stdenv.hostPlatform.system == "i686-linux"
|
|
|
|
|| stdenv.hostPlatform.system == "x86_64-linux")
|
|
|
|
"-DFORCE_SSE42=1")
|
|
|
|
(lib.optional enableLite "-DROCKSDB_LITE=1")
|
2015-04-21 19:01:44 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-06-27 21:12:57 +01:00
|
|
|
homepage = https://rocksdb.org;
|
2015-04-21 19:01:44 +01:00
|
|
|
description = "A library that provides an embeddable, persistent key-value store for fast storage";
|
2019-04-29 07:18:02 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ adev magenbluten ];
|
2015-04-21 19:01:44 +01:00
|
|
|
};
|
|
|
|
}
|