Ricardo Wurmus writes: > It is sometimes possible to patch the sources by replacing the library > name with the full path of the library. Have you tried that? You are right. I think what we need here is to patch all the cffi packages. For instance, sqlite3-lib contains the following lines: --8<---------------cut here---------------start------------->8--- (define-foreign-library sqlite3-lib (:darwin (:default "libsqlite3")) (:unix (:or "libsqlite3.so.0" "libsqlite3.so")) (t (:or (:default "libsqlite3") (:default "sqlite3")))) --8<---------------cut here---------------end--------------->8--- Patching with the full path should work. I'll see what I can do. Maybe we should think of a function to do that automatically for all cffi packages. Not sure how doable that'd be. > Another option is to wrap the executable in LD_LIBRARY_PATH, although > that should only be a last resort. > >> GuixSD has LIBRARY_PATH=~/.guix-profile/lib, can we use that? > > LIBRARY_PATH is only set when you have gcc-toolchain installed. I don’t > have this variable. It is also not applicable here: it is used by the > compiler at build time when linking applications. So to what would you wrap it? The full path of the required libs? E.g. LD_LIBRARY_PATH=/gnu/store/sdin91pj2w7m5avvb6vykh6haq8q2ni0-sqlite-3.21.0/lib/:... -- Pierre Neidhardt