feat: Add support for NuShell scripts

This commit is contained in:
Gerald Pinder 2024-12-24 13:23:54 -05:00
parent 1889bd9984
commit 74bd05643f
13 changed files with 115 additions and 16 deletions

View file

@ -91,6 +91,13 @@ impl<'a> ModuleRequiredFields<'a> {
}
}
#[must_use]
pub fn is_local_source(&self) -> bool {
self.source
.as_deref()
.is_some_and(|source| source == "local")
}
#[must_use]
pub fn generate_akmods_info(&'a self, os_version: &u64) -> AkmodsInfo {
#[derive(Debug, Default, Copy, Clone)]

View file

@ -54,6 +54,11 @@ pub struct Recipe<'a> {
#[builder(into)]
pub alt_tags: Option<Vec<String>>,
/// The version of nushell to use for modules.
#[builder(into)]
#[serde(skip_serializing_if = "Option::is_none", rename = "nushell-version")]
pub nushell_version: Option<Cow<'a, str>>,
/// The stages extension of the recipe.
///
/// This hold the list of stages that can