fluentci-shared 0.2.9

Programmable CI/CD engine without Containers, built on top of Nix ❄️
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use extism::{convert::Json, *};
use fluentci_common::nix::nix as common_nix;
use fluentci_types::nix::NixArgs;

use crate::state::State;

host_fn!(pub nix(user_data: State; args: Json<NixArgs>) -> Json<Nix> {
    let state = user_data.get()?;
    let state = state.lock().unwrap();
    let graph = state.graph.clone();
    let args = args.into_inner();
    let nix = common_nix(graph, true, args)?;
    Ok(Json(nix))
});