2022-10-04 16:32:44 +00:00
|
|
|
{ pkgs, target, util }:
|
|
|
|
|
|
|
|
{
|
|
|
|
inherit target;
|
|
|
|
|
2023-12-12 15:05:09 +00:00
|
|
|
features = with util.features; [ storage-mem storage-rocksdb scripting http storage-tikv ];
|
2022-10-04 16:32:44 +00:00
|
|
|
|
|
|
|
buildSpec = with pkgs; {
|
|
|
|
depsBuildBuild = [ clang protobuf perl ];
|
|
|
|
|
2023-05-11 18:43:41 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-10-04 16:32:44 +00:00
|
|
|
|
2022-12-17 15:08:07 +00:00
|
|
|
buildInputs = [ openssl libiconv darwin.apple_sdk.frameworks.Security ];
|
2022-10-04 16:32:44 +00:00
|
|
|
|
2023-05-11 18:43:41 +00:00
|
|
|
# From https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/rocksdb/default.nix#LL43C7-L52C6
|
|
|
|
NIX_CFLAGS_COMPILE = toString ([
|
|
|
|
"-Wno-error=unused-private-field"
|
|
|
|
"-faligned-allocation"
|
|
|
|
]);
|
2022-10-04 16:32:44 +00:00
|
|
|
|
2023-05-11 18:43:41 +00:00
|
|
|
CARGO_BUILD_TARGET = target;
|
2022-10-04 16:32:44 +00:00
|
|
|
};
|
|
|
|
}
|