Hook: allow source_<os> user-defines and path-like names for source: system - #406
Merged
Merged
Conversation
simolus3
reviewed
Sep 5, 2026
simolus3
left a comment
Owner
There was a problem hiding this comment.
I really wish hooks had a way to configure this out of the box, but since they don't I feel it makes sense to adopt something in the package itself 👍
simolus3
reviewed
Sep 5, 2026
simolus3
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small additions to the build hook for apps that ship SQLite inside one of their own native libraries.
With
source: system, anameis currently always turned into a platform file name (libfoo.dylib,libfoo.so, ...). That does not work for a library that is bundled as a framework on iOS, where the loader needsfoo.framework/foo(or@rpath/...). Names with a directory component are now passed to the loader unchanged, absolute paths keep working as before and plain names are still mapped like today.sourceandnamecan now also be given per operating system as a map (android: system,default: sqlite3and so on; the existingname_<os>keys keep working). Our case, the Immich mobile app: a Rust library in the app already links SQLite with the compile options from this package's binaries and exports thesqlite3_*symbols, so on Android and iOS we pointpackage:sqlite3at that library (one copy of SQLite in the app) whileflutter teston the host keeps the default download.Tests added in
test/hook/description_test.dartfor the path-like names (framework partial,@rpath/..., plain name still mapped) and for the per-OS maps (the iOS entry vsdefault, and a map without an entry for the target OS). The existing download url test now passes a code config since the source lookup needs the target OS. Docs indoc/hook.mdand a changelog line.Tried it in our app on an iPad simulator: the manifest entry becomes
["system", "immich_core_ffi.framework/immich_core_ffi"], nosqlite3.frameworkin the bundle, andsqlite3_libversionresolved through the sqlite3 asset lives in the same loaded image as our Rust library.