Struct flatpak_rs::module::FlatpakModule
source · [−]pub struct FlatpakModule {Show 29 fields
pub format: FlatpakManifestFormat,
pub name: String,
pub disabled: Option<bool>,
pub sources: Vec<FlatpakSourceItem>,
pub config_opts: Vec<String>,
pub make_args: Vec<String>,
pub make_install_args: Vec<String>,
pub rm_configure: Option<bool>,
pub no_autogen: Option<bool>,
pub no_parallel_make: Option<bool>,
pub install_rule: String,
pub no_make_install: Option<bool>,
pub no_python_timestamp_fix: Option<bool>,
pub cmake: Option<bool>,
pub buildsystem: Option<FlatpakBuildSystem>,
pub builddir: Option<bool>,
pub subdir: String,
pub build_options: Option<FlatpakBuildOptions>,
pub build_commands: Vec<String>,
pub post_install: Vec<String>,
pub cleanup: Vec<String>,
pub ensure_writable: Vec<String>,
pub only_arches: Vec<String>,
pub skip_arches: Vec<String>,
pub cleanup_platform: Vec<String>,
pub run_tests: Option<bool>,
pub test_rule: String,
pub test_commands: Vec<String>,
pub modules: Vec<FlatpakModuleItem>,
}
Expand description
Each module specifies a source that has to be separately built and installed. It contains the build options and a list of sources to download and extract before building.
Modules can be nested, in order to turn related modules on and off with a single key.
Fields
format: FlatpakManifestFormat
name: String
The name of the module, used in e.g. build logs. The name is also used for constructing filenames and commandline arguments, therefore using spaces or ‘/’ in this string is a bad idea.
disabled: Option<bool>
If true, skip this module
sources: Vec<FlatpakSourceItem>
An array of objects defining sources that will be downloaded and extracted in order. String members in the array are interpreted as the name of a separate json or yaml file that contains sources. See below for details.
config_opts: Vec<String>
An array of options that will be passed to configure
make_args: Vec<String>
An array of arguments that will be passed to make
make_install_args: Vec<String>
An array of arguments that will be passed to make install
rm_configure: Option<bool>
If true, remove the configure script before starting build
no_autogen: Option<bool>
Ignore the existence of an autogen script
no_parallel_make: Option<bool>
Don’t call make with arguments to build in parallel
install_rule: String
Name of the rule passed to make for the install phase, default is install
no_make_install: Option<bool>
Don’t run the make install (or equivalent) stage
no_python_timestamp_fix: Option<bool>
Don’t fix up the python (*.pyo or *.pyc) header timestamps for ostree use.
cmake: Option<bool>
Use cmake instead of configure (deprecated: use buildsystem instead)
buildsystem: Option<FlatpakBuildSystem>
Build system to use.
builddir: Option<bool>
Use a build directory that is separate from the source directory
subdir: String
Build inside this subdirectory of the extracted sources
build_options: Option<FlatpakBuildOptions>
A build options object that can override global options
build_commands: Vec<String>
An array of commands to run during build (between make and make install if those are used). This is primarily useful when using the “simple” buildsystem. Each command is run in /bin/sh -c, so it can use standard POSIX shell syntax such as piping output.
post_install: Vec<String>
An array of shell commands that are run after the install phase. Can for example clean up the install dir, or install extra files.
cleanup: Vec<String>
An array of file patterns that should be removed at the end. Patterns starting with / are taken to be full pathnames (without the /app prefix), otherwise they just match the basename. Note that any patterns will only match files installed by this module.
ensure_writable: Vec<String>
The way the builder works is that files in the install directory are hard-links to the cached files, so you’re not allowed to modify them in-place. If you list a file in this then the hardlink will be broken and you can modify it. This is a workaround, ideally installing files should replace files, not modify existing ones.
only_arches: Vec<String>
If non-empty, only build the module on the arches listed.
skip_arches: Vec<String>
Don’t build on any of the arches listed.
cleanup_platform: Vec<String>
Extra files to clean up in the platform.
run_tests: Option<bool>
If true this will run the tests after installing.
test_rule: String
The target to build when running the tests. Defaults to “check” for make and “test” for ninja. Set to empty to disable.
test_commands: Vec<String>
Array of commands to run during the tests.
modules: Vec<FlatpakModuleItem>
An array of objects specifying nested modules to be built before this one. String members in the array are interpreted as names of a separate json or yaml file that contains a module.
Implementations
sourceimpl FlatpakModule
impl FlatpakModule
pub fn uses_external_data_checker(&self) -> bool
pub fn get_all_mirror_urls(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_buildsystem(&self) -> Option<String>
pub fn is_patched(&self) -> bool
pub fn load_from_file(path: String) -> Result<FlatpakModule, String>
pub fn parse(
format: FlatpakManifestFormat,
manifest_content: &str
) -> Result<FlatpakModule, String>
pub fn dump(&self) -> Result<String, String>
pub fn file_path_matches(path: &str) -> bool
pub fn get_all_urls(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_all_archive_urls(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_all_git_urls(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_max_depth(&self) -> i32
pub fn get_main_url(&self) -> Option<String>
pub fn get_all_modules_recursively(&self) -> Vec<&FlatpakModuleItem>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourcepub fn is_composite(&self) -> bool
pub fn is_composite(&self) -> bool
A module is composite if it links to multiple software projects. This is determined by the type of the sources contained in the module.
Trait Implementations
sourceimpl Clone for FlatpakModule
impl Clone for FlatpakModule
sourcefn clone(&self) -> FlatpakModule
fn clone(&self) -> FlatpakModule
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FlatpakModule
impl Debug for FlatpakModule
sourceimpl Default for FlatpakModule
impl Default for FlatpakModule
sourcefn default() -> FlatpakModule
fn default() -> FlatpakModule
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for FlatpakModule where
FlatpakModule: Default,
impl<'de> Deserialize<'de> for FlatpakModule where
FlatpakModule: Default,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for FlatpakModule
impl Hash for FlatpakModule
sourceimpl Serialize for FlatpakModule
impl Serialize for FlatpakModule
Auto Trait Implementations
impl RefUnwindSafe for FlatpakModule
impl Send for FlatpakModule
impl Sync for FlatpakModule
impl Unpin for FlatpakModule
impl UnwindSafe for FlatpakModule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more