nixpkgs/pkgs/development/libraries/rocksdb/default.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, lib, bzip2, cmake, lz4, snappy, zlib, zstd, enableLite ? false }:
2015-04-21 19:01:44 +01:00
stdenv.mkDerivation rec {
pname = "rocksdb";
version = "6.3.6";
2018-03-11 15:41:57 +00:00
2015-04-21 19:01:44 +01:00
src = fetchFromGitHub {
owner = "facebook";
repo = pname;
2015-11-06 02:20:18 +00:00
rev = "v${version}";
sha256 = "0i993z7xxsbs595y7wxfhgm69mg5893lfkpidcbaqnzj8j0kn0ab";
2015-04-21 19:01:44 +01:00
};
2018-04-04 02:23:24 +01:00
nativeBuildInputs = [ cmake ];
buildInputs = [ bzip2 lz4 snappy zlib zstd ];
2019-08-07 08:30:35 +01:00
postPatch = ''
substituteInPlace CMakeLists.txt --replace "find_package(zlib " "find_package(ZLIB "
'';
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"
"-DWITH_GFLAGS=0"
(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";
license = licenses.asl20;
maintainers = with maintainers; [ adev magenbluten ];
2015-04-21 19:01:44 +01:00
};
}