From c2a7c08c31e4444de6c8fdde6fd1320f6da795ea Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Fri, 6 Feb 2026 19:12:07 -0500 Subject: [PATCH] lets try it again! --- flake.nix | 5 ++++- scripts/generate.dart | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 04738af..7fef4c2 100644 --- a/flake.nix +++ b/flake.nix @@ -44,11 +44,14 @@ go olm git + llvm + clang flutter ]; env = { - LD_LIBRARY_PATH = "${pkgs.llvmPackages.libclang.lib}/lib:./build/native_assets/linux"; + LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; + LD_LIBRARY_PATH = "./build/native_assets/linux"; CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ]; }; }; diff --git a/scripts/generate.dart b/scripts/generate.dart index 9806603..b240d98 100644 --- a/scripts/generate.dart +++ b/scripts/generate.dart @@ -25,6 +25,8 @@ void main(List args) async { } print("Generating FFI Bindings..."); + + final libclangPath = Platform.environment["LIBCLANG_PATH"]; FfiGenerator( output: Output( dartFile: Platform.script.resolve("../lib/src/third_party/gomuks.g.dart"), @@ -34,6 +36,10 @@ void main(List args) async { compilerOptions: ["--no-warnings"], ), functions: Functions.includeAll, - ).generate(); + ).generate( + libclangDylib: libclangPath == null + ? null + : Uri.file(join(libclangPath, "libclang.so")), + ); print("Done!"); }