forked from solana-foundation/solana-private-channels
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
44 lines (40 loc) · 1.29 KB
/
Copy pathshell.nix
File metadata and controls
44 lines (40 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
pkgs.mkShell {
buildInputs = [
rustup
pkg-config
jemalloc
rocksdb
elfutils
udev
llvmPackages_15.llvm
llvmPackages_15.clang
llvmPackages_15.libclang
openssl
gnumake
protobuf
watchexec
k6
nodejs_24
nodePackages.pnpm
cloudflared
];
shellHook = ''
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
export JEMALLOC_OVERRIDE="${jemalloc.out}/lib/libjemalloc.a"
export LIBCLANG_PATH="${llvmPackages_15.libclang.lib}/lib"
export PATH="$PATH:$(pwd)/target/release:$(pwd)/target/debug"
# FoundationDB paths for the Rust crate to find headers and libraries
export FDB_INCLUDE_DIR="${foundationdb.dev}/include/foundationdb"
export FDB_LIB_DIR="${foundationdb.lib}/lib"
# For local development with sudo access, set up FoundationDB headers
if [ -f "${foundationdb.dev}/include/foundationdb/fdb.options" ]; then
if [ ! -e /usr/include/foundationdb/fdb.options ] && command -v sudo >/dev/null 2>&1; then
echo "Setting up FoundationDB headers (may require sudo password)..."
sudo mkdir -p /usr/include/foundationdb 2>/dev/null
sudo ln -sf ${foundationdb.dev}/include/foundationdb/* /usr/include/foundationdb/ 2>/dev/null
fi
fi
'';
}