Skip to content

Instantly share code, notes, and snippets.

@myypo
Created December 21, 2024 10:33
Show Gist options
  • Save myypo/5394c356448518b587d80b7680595d9a to your computer and use it in GitHub Desktop.
Save myypo/5394c356448518b587d80b7680595d9a to your computer and use it in GitHub Desktop.
Nix restate
{
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
rocksdb,
llvmPackages_19,
protobuf,
liburing,
cmake,
}:
rustPlatform.buildRustPackage rec {
pname = "restate";
version = "1.1.5";
src = fetchFromGitHub {
owner = "restatedev";
repo = "restate";
rev = "v${version}";
hash = "sha256-RzoSNjpM9uiHRh4auwrYEKwoqrU0tItEgWfvYs7Z4rU=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-qFrsT+TuYiBhrq1bjC8FS8tSbsb4X7vxB/dkMRHqLVg=";
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
VERGEN_IDEMPOTENT = true;
VERGEN_GIT_SHA = "75a462dd74464e30677b3244de9ea667aba7fb5f";
RUSTFLAGS = [
"-C force-unwind-tables"
"-C debug-assertions"
"--cfg uuid_unstable"
"--cfg tokio_unstable"
];
nativeBuildInputs = [
pkg-config
openssl
rustPlatform.bindgenHook
llvmPackages_19.clang
llvmPackages_19.bintools
cmake
];
buildInputs = [
liburing
llvmPackages_19.libcxx
];
# Will worry about these later
auditable = false;
doCheck = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment