First the package needs a dynamic library product. You might have to modify the package to have one. Here's an example.
Now make a notebook that clones the package, builds the package, and copies the build artifacts into the right places. Here's an example.
In a Swift notebook, dlopen the shared library and then import the module. For example:
import Glibc dlopen("/swift/toolchain/usr/lib/swift/linux/libDeckOfPlayingCards.so", RTLD_NOW) import DeckOfPlayingCards
Now you can use it. For example: