Applications will generally have a specific Clojure dependency I'm their : dependencies, overruling whatever your library uses. : excludes only matters when there's no direct dependency
My general policy is to use whatever Clojure version is current when the library is created, and then try to keep compatibility for that version as long as practical. It's a good idea to mention the minimum Clojure version you need in your readme.
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?
@csm301 I wonder if any of the “native” options here https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L317 help?
or perhaps the :native-prefix
option within a :dependencies
entry - also, mentioned there
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
I think the sqlite4java lib is actually trying to load the wrong native lib name, for whatever reason, so that might be my issue
yeah, I don’t have much advice beyond just seeing the features here
I haven’t tried doing this before
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
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)