nixpkgs/pkgs/by-name/su/surrealdb/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.5 KiB
Nix
Raw Normal View History

2022-11-16 01:08:02 +00:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, rocksdb_8_3
2022-11-16 01:08:02 +00:00
, testers
, surrealdb
2024-03-15 04:16:36 +00:00
, darwin
, protobuf
2022-11-16 01:08:02 +00:00
}:
let
rocksdb = rocksdb_8_3;
in
2022-11-16 01:08:02 +00:00
rustPlatform.buildRustPackage rec {
pname = "surrealdb";
2024-05-01 11:59:31 +00:00
version = "1.4.2";
2022-11-16 01:08:02 +00:00
src = fetchFromGitHub {
owner = "surrealdb";
repo = "surrealdb";
rev = "v${version}";
2024-05-01 11:59:31 +00:00
hash = "sha256-LC/T+TkHdZ0uWaVQpR2Q9l0fShPL871rOfxxsXyJnvw=";
2022-11-16 01:08:02 +00:00
};
2024-05-01 11:59:31 +00:00
cargoHash = "sha256-1/l++iXiPCIwAVE8VQCSS++/9i3Kh1RNq3WnUjRy2fU=";
2022-11-16 01:08:02 +00:00
2023-05-26 23:18:35 +00:00
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml
'';
2022-11-16 01:08:02 +00:00
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
2022-11-16 01:08:02 +00:00
2024-05-01 11:59:31 +00:00
RUSTFLAGS = "--cfg surrealdb_unstable";
2022-11-16 01:08:02 +00:00
nativeBuildInputs = [
pkg-config
2023-05-26 23:18:35 +00:00
rustPlatform.bindgenHook
2022-11-16 01:08:02 +00:00
];
buildInputs = [ openssl ]
2024-03-15 04:16:36 +00:00
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
2022-11-16 01:08:02 +00:00
2024-03-15 04:10:25 +00:00
doCheck = false;
2024-01-18 14:32:53 +00:00
checkFlags = [
# flaky
"--skip=ws_integration::none::merge"
2024-03-15 04:10:25 +00:00
# requires docker
"--skip=database_upgrade"
2024-01-18 14:32:53 +00:00
];
2024-03-15 04:10:25 +00:00
__darwinAllowLocalNetworking = true;
2022-11-16 01:08:02 +00:00
passthru.tests.version = testers.testVersion {
package = surrealdb;
command = "surreal version";
};
meta = with lib; {
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web";
homepage = "https://surrealdb.com/";
mainProgram = "surreal";
license = licenses.bsl11;
maintainers = with maintainers; [ sikmir happysalada ];
};
}