WIP: Generic activation program #9

Draft
ecoppens wants to merge 11 commits from ecoppens/colmena:main into main
Showing only changes of commit 9b530b6ff6 - Show all commits

View file

@ -53,6 +53,7 @@ pub enum Request {
/// Realizes the derivation
Realize {
path: StorePath,
remote: bool,
},
/// Uploads keys to host
@ -116,6 +117,27 @@ impl Host for GenericHost {
.call(
Request::Realize {
path: derivation.clone(),
remote: true
},
move |response, mut store_paths| {
match response {
Response::Progress { phase } => println!("{}", phase),
Response::NewStorePath { store_path } => store_paths.push(store_path),
_ => (),
};
store_paths
},
Vec::new(),
)
.await?)
}
async fn realize(&mut self, derivation: &StorePath) -> ColmenaResult<Vec<StorePath>> {
Ok(self
.call(
Request::Realize {
path: derivation.clone(),
remote: false
},
move |response, mut store_paths| {
match response {