mirror of
https://github.com/logos-messaging/logos-chat.git
synced 2026-03-01 13:23:07 +00:00
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
18 lines
397 B
Nix
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#'"
|
|
'';
|
|
}
|