summary refs log tree commit diff
path: root/pkgs/development/libraries/rocksdb
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2017-07-24 21:45:33 -0400
committerCharles Strahan <charles@cstrahan.com>2017-07-24 21:45:33 -0400
commit29d2fe4a1f2f192f5f28306fda34a537e017bc60 (patch)
treeb8b737a0021644da0c480e7b316c316b2c0c3913 /pkgs/development/libraries/rocksdb
parentdc21851707e8a515539f666816dcb85393622b2b (diff)
downloadnixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.tar
nixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.tar.gz
nixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.tar.bz2
nixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.tar.lz
nixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.tar.xz
nixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.tar.zst
nixpkgs-29d2fe4a1f2f192f5f28306fda34a537e017bc60.zip
rocksdb: enable support for lite mode
See: https://github.com/facebook/rocksdb/blob/master/ROCKSDB_LITE.md
Diffstat (limited to 'pkgs/development/libraries/rocksdb')
-rw-r--r--pkgs/development/libraries/rocksdb/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix
index 25aeb3a6da1..a791c899485 100644
--- a/pkgs/development/libraries/rocksdb/default.nix
+++ b/pkgs/development/libraries/rocksdb/default.nix
@@ -6,6 +6,8 @@
 
 # Malloc implementation
 , jemalloc ? null, gperftools ? null
+
+, enableLite ? false
 }:
 
 let
@@ -35,6 +37,9 @@ stdenv.mkDerivation rec {
   CMAKE_CXX_FLAGS = "-std=gnu++11";
   JEMALLOC_LIB = stdenv.lib.optionalString (malloc == jemalloc) "-ljemalloc";
 
+  ${if enableLite then "LIBNAME" else null} = "librocksdb_lite";
+  ${if enableLite then "CXXFLAGS" else null} = "-DROCKSDB_LITE=1";
+
   buildFlags = [
     "DEBUG_LEVEL=0"
     "shared_lib"