logos-chat/nix/shell.nix
osmaczko f5aa1a7e65
feat: statically link libchat and rln via rust-bundle
Add rust-bundle, a single staticlib crate that depends on both libchat
and rln as rlibs. This ensures rustc links Rust std exactly once,
eliminating duplicate symbol errors on all platforms. Nim targets link
against liblogos_chat_bundle.a; Nix uses a bundleDrv instead of
separate libchat and rln derivations.

Reference: https://doc.rust-lang.org/reference/linkage.html#mixed-rust-and-foreign-codebases
2026-02-28 21:11:25 +01:00

18 lines
397 B
Nix

{ pkgs, lib, stdenv, libchatDrv }:
let
libExt = if stdenv.isDarwin then "dylib" else "so";
in pkgs.mkShell {
buildInputs = with pkgs; [
nim cargo rustc clippy rustfmt
git cmake gnumake which pkg-config
openssl miniupnpc libnatpmp
];
shellHook = ''
echo "logos-chat dev shell."
echo "Build: make liblogoschat"
echo "Nix build: nix build '.?submodules=1#'"
'';
}