Write the build start to the database.

This commit is contained in:
Tom Alexander
2026-02-16 20:42:03 -05:00
parent ab1f86384b
commit c4c811a099
5 changed files with 40 additions and 51 deletions

View File

@@ -10,16 +10,18 @@ use crate::database::db_handle::DbHandle;
use super::running_build::RunningBuild;
pub(crate) async fn nixos_build_target<B, F, A>(
pub(crate) async fn nixos_build_target<B, F, A, TN>(
db_handle: &DbHandle,
build_path: B,
flake_path: F,
attr: A,
target_name: TN,
) -> Result<()>
where
B: AsRef<Path>,
F: AsRef<Path>,
A: AsRef<str>,
TN: AsRef<str>,
{
let reference = {
let path = AsRef::<OsStr>::as_ref(flake_path.as_ref());
@@ -55,7 +57,7 @@ where
let child = command.spawn()?;
let mut running_build = RunningBuild::new(db_handle)?;
running_build.run_to_completion(child).await?;
running_build.run_to_completion(child, target_name).await?;
Ok(())
}