mirror of
https://github.com/nix-community/flakelight.git
synced 2025-06-21 18:11:45 +02:00
Wrap NixOS build checks
NixOS build checks significantly slowed down `nix flake show` as it prints out the derivation names, which for NixOS derivations requires a large amount of evaluation. By wrapping the derivations, we now give them trivial names. The NixOS configurations are still built when running checks as they are a dependency of the wrappers.
This commit is contained in:
parent
395ac91da0
commit
366733be87
@ -32,8 +32,9 @@ in
|
|||||||
nixosConfigurations = configs;
|
nixosConfigurations = configs;
|
||||||
checks = foldl recursiveUpdate { } (mapAttrsToList
|
checks = foldl recursiveUpdate { } (mapAttrsToList
|
||||||
(n: v: {
|
(n: v: {
|
||||||
${v.config.nixpkgs.system}."nixos-${n}" =
|
${v.config.nixpkgs.system}."nixos-${n}" = v.pkgs.runCommand
|
||||||
v.config.system.build.toplevel;
|
"check-nixos-${n}"
|
||||||
|
{ } "echo ${v.config.system.build.toplevel} > $out";
|
||||||
})
|
})
|
||||||
configs);
|
configs);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user