Fork me on GitHub
#leiningen
<
2019-10-02
>
csm21:10:41

how do I use native artifacts that aren’t in jars? E.g. [com.almworks.sqlite4java/libsqlite4java-osx "1.0.392" :extension "dylib"]? This dep puts the dylib in ~/.m2/repository, but how can I set java.library.path to include that?

mikerod21:10:16

or perhaps the :native-prefix option within a :dependencies entry - also, mentioned there

csm21:10:34

not so far, from what I’ve tried. I don’t see the native lib get copied into target/native. Also %s doesn’t expand to the target path in jvm-opts, and it seems you can’t use a function in :jvm-opts

csm21:10:17

I think the sqlite4java lib is actually trying to load the wrong native lib name, for whatever reason, so that might be my issue

mikerod21:10:36

yeah, I don’t have much advice beyond just seeing the features here

mikerod21:10:44

I haven’t tried doing this before

csm22:10:41

yeah, it’s this library that’s problematic; it tries loading from the dir the jar is in, which isn’t correct when using maven deps

csm22:10:42

I can override it with a system property, but again I think I’m stuck because I can’t dynamically generate the right path (I’d like to make it just work out of the box on any system, and the path to my maven repo isn’t portable)