Struct 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§

Source§

impl FlatpakModule

Source

pub fn uses_external_data_checker(&self) -> bool

Source

pub fn get_mirror_urls(&self) -> Vec<String>

Source

pub fn get_buildsystem(&self) -> Option<String>

Source

pub fn is_patched(&self) -> bool

Source

pub fn load_from_file(path: String) -> Result<FlatpakModule, String>

Source

pub fn parse( format: FlatpakManifestFormat, manifest_content: &str, ) -> Result<FlatpakModule, String>

Source

pub fn dump(&self) -> Result<String, String>

Source

pub fn file_path_matches(path: &str) -> bool

Source

pub fn get_urls( &self, include_mirror_urls: bool, include_source_types: Option<Vec<FlatpakSourceType>>, ) -> Vec<String>

Source

pub fn get_max_depth(&self) -> i32

Source

pub fn get_main_url(&self) -> Option<String>

Source

pub fn get_all_modules_recursively(&self) -> Vec<&FlatpakModuleItem>

Source

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.

Source

pub fn get_commands<I, S>( &self, args: I, reconfigure: bool, root_path: &str, build_path: &str, out_path: Option<&str>, num_cpus: i64, ) -> Vec<Command>
where I: IntoIterator<Item = S>, S: AsRef<OsStr>,

Gets the build commands associated with a module.

Trait Implementations§

Source§

impl Clone for FlatpakModule

Source§

fn clone(&self) -> FlatpakModule

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FlatpakModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FlatpakModule

Source§

fn default() -> FlatpakModule

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FlatpakModule

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Hash for FlatpakModule

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Serialize for FlatpakModule

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,