16 lines
262 B
Rust
16 lines
262 B
Rust
use nixcp::store::Store;
|
|
|
|
pub struct Context {
|
|
pub store: Store,
|
|
}
|
|
|
|
impl Context {
|
|
fn new() -> Self {
|
|
let store = Store::connect().expect("connect to nix store");
|
|
Self { store }
|
|
}
|
|
}
|
|
|
|
pub fn context() -> Context {
|
|
Context::new()
|
|
}
|