hive: Convert derivations to drvPath in separate attribute
This is to make way for the nix-eval-jobs streaming evaluator.
This commit is contained in:
parent
7e15450fd2
commit
3fa0dee6b0
2 changed files with 4 additions and 4 deletions
|
@ -510,8 +510,8 @@ let
|
||||||
evalAll = evalSelected nodeNames;
|
evalAll = evalSelected nodeNames;
|
||||||
evalSelected = names: let
|
evalSelected = names: let
|
||||||
selected = lib.filterAttrs (name: _: elem name names) toplevel;
|
selected = lib.filterAttrs (name: _: elem name names) toplevel;
|
||||||
drvs = lib.mapAttrs (k: v: v.drvPath) selected;
|
in selected;
|
||||||
in drvs;
|
evalSelectedDrvPaths = names: lib.mapAttrs (k: v: v.drvPath) (evalSelected names);
|
||||||
|
|
||||||
introspect = function: function {
|
introspect = function: function {
|
||||||
inherit pkgs lib nodes;
|
inherit pkgs lib nodes;
|
||||||
|
@ -520,7 +520,7 @@ in {
|
||||||
inherit
|
inherit
|
||||||
nodes toplevel
|
nodes toplevel
|
||||||
deploymentConfig deploymentConfigSelected
|
deploymentConfig deploymentConfigSelected
|
||||||
evalAll evalSelected introspect;
|
evalAll evalSelected evalSelectedDrvPaths introspect;
|
||||||
|
|
||||||
meta = hive.meta;
|
meta = hive.meta;
|
||||||
|
|
||||||
|
|
|
@ -259,7 +259,7 @@ impl Hive {
|
||||||
pub async fn eval_selected(&self, nodes: &[NodeName], job: Option<JobHandle>) -> ColmenaResult<HashMap<NodeName, ProfileDerivation>> {
|
pub async fn eval_selected(&self, nodes: &[NodeName], job: Option<JobHandle>) -> ColmenaResult<HashMap<NodeName, ProfileDerivation>> {
|
||||||
let nodes_expr = SerializedNixExpresssion::new(nodes)?;
|
let nodes_expr = SerializedNixExpresssion::new(nodes)?;
|
||||||
|
|
||||||
let expr = format!("hive.evalSelected {}", nodes_expr.expression());
|
let expr = format!("hive.evalSelectedDrvPaths {}", nodes_expr.expression());
|
||||||
|
|
||||||
let command = self.nix_instantiate(&expr)
|
let command = self.nix_instantiate(&expr)
|
||||||
.eval_with_builders().await?;
|
.eval_with_builders().await?;
|
||||||
|
|
Loading…
Reference in a new issue