Add Nix flake development environment with direnv

This commit is contained in:
Priec
2025-07-28 11:41:50 +02:00
parent 7b52a739c2
commit 64fd7e4af2
4 changed files with 81 additions and 2 deletions

View File

@@ -19,16 +19,32 @@
cargo
rustfmt
clippy
cargo-watch
# C build tools (for your linker issue)
gcc
binutils
pkg-config
# OpenSSL for crypto dependencies
openssl
openssl.dev
# PostgreSQL for sqlx
postgresql
sqlx-cli
# Protocol Buffers compiler for gRPC
protobuf
];
shellHook = ''
export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH"
export OPENSSL_DIR="${pkgs.openssl.dev}"
export OPENSSL_LIB_DIR="${pkgs.openssl.out}/lib"
export OPENSSL_INCLUDE_DIR="${pkgs.openssl.dev}/include"
echo "🦀 Rust development environment loaded"
echo "Run 'cargo check' to verify everything works"
echo "OpenSSL and PostgreSQL available"
'';
};
}