diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2019-12-26 14:16:15 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2019-12-26 14:17:36 +0100 |
commit | 77b6c3cd06a679140fb5a44f81f904497007f333 (patch) | |
tree | e8ed1606b326cdafba719cc2a14c527c1b601f2e /pkgs/development/libraries/rocksdb | |
parent | 602bccd1a8262d4e6bd787838d21fc3c2c1c50ba (diff) | |
parent | 4d2dd1554618831f0a5b159b8a4dff86612c02a9 (diff) |
Merge remote-tracking branch 'origin/master' into gcc-9
Diffstat (limited to 'pkgs/development/libraries/rocksdb')
-rw-r--r-- | pkgs/development/libraries/rocksdb/default.nix | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index 60b02a13cb77..3f3b50ea8fe6 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -1,19 +1,31 @@ -{ stdenv, fetchFromGitHub, lib, bzip2, cmake, lz4, snappy, zlib, zstd, enableLite ? false }: +{ stdenv, fetchFromGitHub, fetchpatch +, cmake, ninja +, bzip2, lz4, snappy, zlib, zstd +, enableLite ? false +}: stdenv.mkDerivation rec { pname = "rocksdb"; - version = "6.3.6"; + version = "6.4.6"; src = fetchFromGitHub { owner = "facebook"; repo = pname; rev = "v${version}"; - sha256 = "0i993z7xxsbs595y7wxfhgm69mg5893lfkpidcbaqnzj8j0kn0ab"; + sha256 = "0s0n4p1b4jzmslz9d2xd4ajra0m6l9x26mjwlbgw0klxjggmy8qn"; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ninja ]; buildInputs = [ bzip2 lz4 snappy zlib zstd ]; + patches = [ + # https://github.com/facebook/rocksdb/pull/6076 + (fetchpatch { + url = "https://github.com/facebook/rocksdb/commit/c0be4b2ff1a5393419673fab961cb9b09ba38752.diff"; + sha256 = "1f2wg9kqlmf2hiiihmbp8m5fr2wnn7896g6i9yg9hdgi40pw30w6"; + }) + ]; + postPatch = '' substituteInPlace CMakeLists.txt --replace "find_package(zlib " "find_package(ZLIB " ''; @@ -32,13 +44,18 @@ stdenv.mkDerivation rec { "-DWITH_ZLIB=1" "-DWITH_ZSTD=1" "-DWITH_GFLAGS=0" - (lib.optional - (stdenv.hostPlatform.system == "i686-linux" - || stdenv.hostPlatform.system == "x86_64-linux") + "-DUSE_RTTI=1" + "-DROCKSDB_INSTALL_ON_WINDOWS=YES" # harmless elsewhere + (stdenv.lib.optional + (stdenv.hostPlatform.isx86 && stdenv.hostPlatform.isLinux) "-DFORCE_SSE42=1") - (lib.optional enableLite "-DROCKSDB_LITE=1") + (stdenv.lib.optional enableLite "-DROCKSDB_LITE=1") + "-DFAIL_ON_WARNINGS=${if stdenv.hostPlatform.isMinGW then "NO" else "YES"}" ]; + # otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]" + hardeningDisable = stdenv.lib.optional stdenv.hostPlatform.isWindows "format"; + meta = with stdenv.lib; { homepage = https://rocksdb.org; description = "A library that provides an embeddable, persistent key-value store for fast storage"; |