Add sqlite for tracking build history.

This commit is contained in:
Tom Alexander
2026-02-14 22:15:09 -05:00
parent 0e0c5dac80
commit 7eb36ce0a4
16 changed files with 442 additions and 30 deletions

View File

@@ -73,4 +73,11 @@ impl Config {
let work_dir = current_dir.join("work");
Ok(Cow::Owned(work_dir))
}
/// The path to the sqlite database where run history is stored.
pub(crate) fn get_database_path(&self) -> Result<Cow<'_, Path>, CustomError> {
let output_directory = self.get_output_directory()?;
let database_path = output_directory.join("nix_builder.sqlite");
Ok(Cow::Owned(database_path))
}
}