I’m trying to add an optional library— Ggit
—to a Flatpak app prototype written in GJS, using Builder. However, when I run the application, I get the following error:
JS ERROR: Error: Requiring Ggit, version none: Typelib file for namespace 'Ggit' (any version) not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
It seems like I’m missing a step to properly expose or include the Ggit
introspection data. Could someone point out what I’m doing wrong?
Here’s the relevant part of my Flatpak json configuration:
{
...
"modules" : [
{
"name" : "test",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "file:///home/user/Projects/test",
"branch": "main"
}
]
},
{
"name" : "libssh2",
"buildsystem" : "cmake-ninja",
"config-opts" : [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DCMAKE_INSTALL_LIBDIR:PATH=/app/lib",
"-DBUILD_SHARED_LIBS:BOOL=ON"
],
"cleanup" : [
"/share/doc"
],
"sources" : [
{
"type" : "git",
"url" : "https://github.com/libssh2/libssh2.git",
"tag" : "libssh2-1.10.0"
}
]
},
{
"name" : "libgit2",
"buildsystem" : "cmake-ninja",
"config-opts" : [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DCMAKE_INSTALL_LIBDIR:PATH=/app/lib",
"-DBUILD_SHARED_LIBS:BOOL=ON",
"-DUSE_SSH:BOOL=ON",
"-DUSE_THREADS:BOOL=ON"
],
"sources" : [
{
"type" : "git",
"url" : "https://github.com/libgit2/libgit2.git",
"tag" : "v1.6.4"
}
]
},
{
"name" : "libgit2-glib",
"config-opts" : [
"--buildtype=debugoptimized"
],
"buildsystem" : "meson",
"builddir" : true,
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/GNOME/libgit2-glib.git",
"branch" : "master"
}
]
}
]
}