WIP: Generic activation program #9
1 changed files with 22 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue