Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new: Support configuring and installing system requirements. #1118

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .yarn/versions/d72d44b3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
releases:
"@moonrepo/cli": minor
"@moonrepo/core-linux-arm64-gnu": minor
"@moonrepo/core-linux-arm64-musl": minor
"@moonrepo/core-linux-x64-gnu": minor
"@moonrepo/core-linux-x64-musl": minor
"@moonrepo/core-macos-arm64": minor
"@moonrepo/core-macos-x64": minor
"@moonrepo/core-windows-x64-msvc": minor
93 changes: 53 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ reqwest = { version = "0.11.22", default-features = false, features = [
"native-tls-vendored",
] }
rustc-hash = "1.1.0"
schematic = { version = "0.11.8", default-features = false, features = [
schematic = { version = "0.12.5", default-features = false, features = [
"config",
"schema",
"url",
"yaml",
Expand Down
1 change: 1 addition & 0 deletions nextgen/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ schematic = { workspace = true, features = [
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
system_env = { version = "0.1.0", features = ["schematic"] }
tracing = { workspace = true }

[dev-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions nextgen/config/src/toolchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ mod bin_config;
mod deno_config;
mod node_config;
mod rust_config;
mod system_config;
mod typescript_config;

pub use bin_config::*;
pub use deno_config::*;
pub use node_config::*;
pub use rust_config::*;
pub use system_config::*;
pub use typescript_config::*;

#[macro_export]
Expand Down
8 changes: 8 additions & 0 deletions nextgen/config/src/toolchain/system_config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use schematic::Config;
use system_env::SystemDependency;

/// Docs: https://moonrepo.dev/docs/config/toolchain#system
#[derive(Clone, Config, Debug)]
pub struct SystemConfig {
pub requirements: Vec<SystemDependency>,
}
3 changes: 3 additions & 0 deletions nextgen/config/src/toolchain_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pub struct ToolchainConfig {
#[setting(nested)]
pub rust: Option<RustConfig>,

#[setting(nested)]
pub system: SystemConfig,

#[setting(nested)]
pub typescript: Option<TypeScriptConfig>,
}
Expand Down
Loading
Loading