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

67 lines
1.6 KiB
Nix
Raw Normal View History

2015-04-21 18:01:44 +00:00
{ stdenv, fetchFromGitHub
# Optional Arguments
, snappy ? null, google-gflags ? null, zlib ? null, bzip2 ? null, lz4 ? null
, numactl ? null
# Malloc implementation
, jemalloc ? null, gperftools ? null
}:
let
malloc = if jemalloc != null then jemalloc else gperftools;
in
stdenv.mkDerivation rec {
name = "rocksdb-${version}";
2016-12-15 17:05:00 +00:00
version = "4.13";
2015-04-21 18:01:44 +00:00
src = fetchFromGitHub {
owner = "facebook";
repo = "rocksdb";
2015-11-06 02:20:18 +00:00
rev = "v${version}";
2016-12-15 17:05:00 +00:00
sha256 = "1bxyykj13mw48yk108bkmxlfrp6bd95f27bysayax4lqxkgx0zzw";
2015-04-21 18:01:44 +00:00
};
2016-12-15 17:05:00 +00:00
buildInputs = [ snappy google-gflags zlib bzip2 lz4 malloc ];
2015-04-21 18:01:44 +00:00
postPatch = ''
# Hack to fix typos
sed -i 's,#inlcude,#include,g' build_tools/build_detect_platform
'';
# Environment vars used for building certain configurations
PORTABLE = "1";
USE_SSE = "1";
2015-07-09 13:00:31 +00:00
CMAKE_CXX_FLAGS = "-std=gnu++11";
2015-04-21 18:01:44 +00:00
JEMALLOC_LIB = stdenv.lib.optionalString (malloc == jemalloc) "-ljemalloc";
buildFlags = [
2016-12-29 13:38:51 +00:00
"DEBUG_LEVEL=0"
"shared_lib"
"static_lib"
2015-04-21 18:01:44 +00:00
];
installFlags = [
2016-12-29 13:38:51 +00:00
"INSTALL_PATH=\${out}"
"DEBUG_LEVEL=0"
"install-shared"
"install-static"
2015-04-21 18:01:44 +00:00
];
postInstall = ''
# Might eventually remove this when we are confident in the build process
echo "BUILD CONFIGURATION FOR SANITY CHECKING"
cat make_config.mk
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = http://rocksdb.org;
description = "A library that provides an embeddable, persistent key-value store for fast storage";
license = licenses.bsd3;
2015-08-26 16:48:51 +00:00
platforms = platforms.allBut [ "i686-linux" ];
2015-04-21 18:01:44 +00:00
maintainers = with maintainers; [ wkennington ];
};
}