Set up initial structure for the nix builder.

This commit is contained in:
Tom Alexander
2026-02-14 13:31:21 -05:00
commit 9344e5708f
19 changed files with 2267 additions and 0 deletions

3
src/command/build/mod.rs Normal file
View File

@@ -0,0 +1,3 @@
mod runner;
pub(crate) use runner::run_build;

View File

@@ -0,0 +1,29 @@
use crate::cli::parameters::BuildArgs;
use crate::config::Config;
use crate::config::TargetConfig;
use crate::error::CustomError;
pub(crate) async fn run_build(args: BuildArgs) -> Result<(), CustomError> {
println!("{:?}", args);
let config = Config::load_from_file(args.config).await?;
println!("{:?}", config);
for target_name in args.target {
let target_config = {
let target_config = config.get_target_config(&target_name)?;
if let Some(conf) = target_config {
conf
} else {
return Err(format!("Could not find target {}", target_name).into());
}
};
prepare_flake_repo(target_config).await?;
}
Ok(())
}
async fn prepare_flake_repo(target_config: &TargetConfig) -> Result<(), CustomError> {
todo!()
}