Integrating and Staging Packages build from Source

Can anyone help me with making me understand how do i make my snap apps use components build from source, let me elaborate a bit, i am building celluloid and to make the snap use latest ffmpeg and libmpv i also build those from source but the problem is that the celluloid part wont recognize them and still report them missing but this is not the case if i stage them from jammy repos. This is also observed in my another snap xdman/xdm-snap the xdm part wont use ffmpeg and yt-dlp built from source but works fine with the ones from jammy.

This problem have been troubling me since a past few weeks, any insights will be helpful.

Here are the YAMLs :

  1. celluloid
  1. xdman/xdm-snap

The XDM Issue is related to snap confinement and is thus i solved it somehow but the celluloid issue that pests me is that it gives error related to gnome-sdk when using stuffs like libgtk etc.

''ERROR: /snap/celluloid/3/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127 /snap/celluloid/3/usr/bin/celluloid: symbol lookup error: /snap/celluloid/3/gnome-platform/usr/lib/x86_64-linux-gnu/ undefined symbol: hb_ot_color_has_paint

Somehow i fill fix it later, as this is something from my side