anchor.diff: -{ stdenv, fetchFromGitHub, lib, bzip2, cmake, lz4, snappy, zlib, zstd, enableLite ? false }:
  +{ stdenv, fetchFromGitHub, fetchpatch
  +, cmake
  +, bzip2, lz4, snappy, zlib, zstd
  +, enableLite ? false
  +}:
   
   stdenv.mkDerivation rec {
     pname = "rocksdb";
  
positive.code: 
    nativeBuildInputs = [ cmake ];
    buildInputs = [ bzip2 lz4 snappy zlib zstd ];
  
    postPatch = ''
      substituteInPlace CMakeLists.txt --replace "find_package(zlib " "find_package(ZLIB "
  
negative.code:     "-DWITH_ZLIB=1"
      "-DWITH_ZSTD=1"
      "-DWITH_GFLAGS=0"
      "-DROCKSDB_INSTALL_ON_WINDOWS=YES" # harmless elsewhere
      (stdenv.lib.optional
          (stdenv.hostPlatform.isx86 && stdenv.hostPlatform.isLinux)
          "-DFORCE_SSE42=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;
  