fix EvalStateBuilderExt
This commit is contained in:
parent
3ebb96db63
commit
3cdfae01b9
1 changed files with 8 additions and 11 deletions
|
|
@ -1,17 +1,14 @@
|
||||||
|
use super::FlakeSettings;
|
||||||
|
use crate::{EvalStateBuilder, NixErrorCode};
|
||||||
|
|
||||||
pub trait EvalStateBuilderExt {
|
pub trait EvalStateBuilderExt {
|
||||||
/// Configures the eval state to provide flakes features such as `builtins.getFlake`.
|
/// Configures the eval state to provide flakes features such as `builtins.getFlake`.
|
||||||
fn flakes(
|
fn flakes(self, settings: &FlakeSettings) -> Result<EvalStateBuilder, NixErrorCode>;
|
||||||
self,
|
|
||||||
settings: &FlakeSettings,
|
|
||||||
) -> Result<nix_bindings_expr::eval_state::EvalStateBuilder>;
|
|
||||||
}
|
}
|
||||||
impl EvalStateBuilderExt for nix_bindings_expr::eval_state::EvalStateBuilder {
|
|
||||||
|
impl EvalStateBuilderExt for EvalStateBuilder {
|
||||||
/// Configures the eval state to provide flakes features such as `builtins.getFlake`.
|
/// Configures the eval state to provide flakes features such as `builtins.getFlake`.
|
||||||
fn flakes(
|
fn flakes(mut self, settings: &FlakeSettings) -> Result<EvalStateBuilder, NixErrorCode> {
|
||||||
mut self,
|
settings.add_to_eval_state_builder(&mut self).map(|_| self)
|
||||||
settings: &FlakeSettings,
|
|
||||||
) -> Result<nix_bindings_expr::eval_state::EvalStateBuilder> {
|
|
||||||
settings.add_to_eval_state_builder(&mut self)?;
|
|
||||||
Ok(self)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue