leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
csm 2019-10-02T21:31:41.037200Z

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?

2019-10-02T21:51:28.037500Z

@csm301 I wonder if any of the “native” options here https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L317 help?

2019-10-02T21:52:16.038100Z

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

csm 2019-10-02T21:53:34.039500Z

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

csm 2019-10-02T21:54:17.040400Z

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

2019-10-02T21:55:36.040700Z

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

2019-10-02T21:55:44.040900Z

I haven’t tried doing this before

csm 2019-10-02T22:13:41.041800Z

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

csm 2019-10-02T22:14:42.043Z

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)