forked from Fediversity/Fediversity
data model: add TF test #4
1 changed files with 13 additions and 25 deletions
|
@ -14,9 +14,7 @@ let
|
||||||
mkOption
|
mkOption
|
||||||
evalModules
|
evalModules
|
||||||
filterAttrs
|
filterAttrs
|
||||||
attrsToList
|
mapAttrs'
|
||||||
map
|
|
||||||
listToAttrs
|
|
||||||
deepSeq
|
deepSeq
|
||||||
;
|
;
|
||||||
inherit (lib.attrsets) genAttrs;
|
inherit (lib.attrsets) genAttrs;
|
||||||
|
@ -200,27 +198,17 @@ in
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
checks =
|
checks =
|
||||||
listToAttrs (
|
mapAttrs' (name: nixosConfiguration: {
|
||||||
map (
|
name = "nixosConfigurations-${name}";
|
||||||
{ name, value }:
|
value = nixosConfiguration.config.system.build.toplevel;
|
||||||
{
|
}) nixosConfigurations
|
||||||
name = "nixosConfigurations-${name}";
|
// mapAttrs' (name: vmOptions: {
|
||||||
value = value.config.system.build.toplevel;
|
name = "vmOptions-${name}";
|
||||||
}
|
## Check that VM options builds/evaluates correctly. `deepSeq e1
|
||||||
) (attrsToList nixosConfigurations)
|
## e2` evaluates `e1` strictly in depth before returning `e2`. We
|
||||||
)
|
## use this trick because checks need to be derivations, which VM
|
||||||
// listToAttrs (
|
## options are not.
|
||||||
map (
|
value = deepSeq vmOptions pkgs.hello;
|
||||||
{ name, value }:
|
}) vmOptions;
|
||||||
{
|
|
||||||
name = "vmOptions-${name}";
|
|
||||||
## Check that VM options builds/evaluates correctly. `deepSeq e1
|
|
||||||
## e2` evaluates `e1` strictly in depth before returning `e2`. We
|
|
||||||
## use this trick because checks need to be derivations, which VM
|
|
||||||
## options are not.
|
|
||||||
value = deepSeq value pkgs.hello;
|
|
||||||
}
|
|
||||||
) (attrsToList vmOptions)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue